Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[frontend] Externalize HueButton styles
- Loading branch information
1 parent
c81dbce
commit 1a84a8c
Showing
2 changed files
with
132 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/* | ||
Licensed to Cloudera, Inc. under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. Cloudera, Inc. licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
@import './styles/colors'; | ||
@import './styles/variables'; | ||
|
||
.hue-btn { | ||
height: 32px; | ||
border-radius: $fluid-border-radius; | ||
border: solid 1px $fluid-gray-300; | ||
background-color: $fluid-white; | ||
color: $fluid-blue-500; | ||
padding: 0 12px; | ||
|
||
&.hue-btn-small { | ||
font-size: 12px; | ||
height: 24px; | ||
padding: 0 8px; | ||
} | ||
|
||
&.hue-btn-large { | ||
font-size: 16px; | ||
height: 40px; | ||
padding: 0 20px; | ||
} | ||
|
||
&:hover { | ||
border: solid 1px $fluid-blue-700; | ||
} | ||
|
||
&:active { | ||
border: solid 1px $fluid-blue-800; | ||
} | ||
|
||
&[disabled] { | ||
cursor: default; | ||
color: $fluid-gray-400; | ||
border: solid 1px $fluid-gray-200; | ||
} | ||
|
||
&:focus { | ||
outline: none; | ||
} | ||
|
||
&:focus-visible { | ||
border: solid 1px $fluid-blue-800; | ||
outline: $fluid-blue-100 auto 4px; | ||
} | ||
|
||
&.hue-btn-primary:not([disabled]) { | ||
color: $fluid-white; | ||
background-color: $fluid-blue-500; | ||
border: solid 1px $fluid-blue-500; | ||
|
||
&:hover { | ||
background-color: $fluid-blue-700; | ||
border: solid 1px $fluid-blue-700; | ||
} | ||
|
||
&.active { | ||
background-color: $fluid-blue-800; | ||
border: solid 1px $fluid-blue-800; | ||
} | ||
|
||
&:focus-visible { | ||
border: solid 1px $fluid-gray-900; | ||
} | ||
} | ||
|
||
&.hue-btn-alert:not([disabled]) { | ||
color: $fluid-white; | ||
background-color: $fluid-red-500; | ||
border: solid 1px $fluid-red-500; | ||
|
||
&:hover { | ||
background-color: $fluid-red-700; | ||
border: solid 1px $fluid-red-700; | ||
} | ||
|
||
&:active { | ||
background-color: $fluid-red-800; | ||
border: solid 1px $fluid-red-800; | ||
} | ||
|
||
&:focus-visible { | ||
border: solid 1px $fluid-red-800; | ||
outline-color: $fluid-red-100; | ||
outline-width: 4px; | ||
} | ||
} | ||
|
||
&.hue-btn-borderless:not([disabled]) { | ||
border: solid 1px transparent; | ||
|
||
&:hover { | ||
border: solid 1px $fluid-gray-300; | ||
} | ||
|
||
&:active { | ||
border: solid 1px $fluid-gray-400; | ||
} | ||
} | ||
|
||
&.hue-btn-borderless[disabled] { | ||
border: solid 1px transparent; | ||
color: $fluid-gray-400; | ||
} | ||
|
||
&.hue-btn-alert[disabled], | ||
&.hue-btn-primary[disabled] { | ||
background-color: $fluid-gray-200; | ||
border: solid 1px $fluid-gray-200; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters