Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 1 | .btn { |
Derick Montague | 3f6710a | 2020-03-04 00:59:47 -0600 | [diff] [blame] | 2 | padding-top: $spacer / 2; |
| 3 | padding-right: $spacer; |
| 4 | padding-bottom: $spacer / 2; |
| 5 | padding-left: $spacer; |
| 6 | |
| 7 | // Buttons with SVGs and text expect |
| 8 | // text to be wrapped in a span element |
| 9 | svg + span { |
| 10 | margin-left: $spacer / 4; |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 11 | } |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 12 | &:disabled { |
| 13 | color: gray("600"); |
| 14 | fill: currentColor; |
| 15 | box-shadow: none !important; |
| 16 | &:not(.btn-link) { |
| 17 | border-color: gray("400"); |
| 18 | background-color: gray("400"); |
| 19 | } |
| 20 | } |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | .btn-primary { |
Derick Montague | 7f970a1 | 2020-03-02 17:56:09 -0600 | [diff] [blame] | 24 | fill: currentColor; |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 25 | &:focus, |
| 26 | &:not(:disabled):not(.disabled):active:focus { |
| 27 | border-color: $white; |
| 28 | box-shadow: inset 0 0 0 3px theme-color('primary'), inset 0 0 0 5px $white; |
| 29 | } |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | .btn-secondary { |
Derick Montague | 7f970a1 | 2020-03-02 17:56:09 -0600 | [diff] [blame] | 33 | fill: currentColor; |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 34 | &:focus, |
| 35 | &:not(:disabled):not(.disabled):active:focus { |
| 36 | border-color: $white; |
| 37 | box-shadow: inset 0 0 0 3px theme-color('secondary'), inset 0 0 0 5px $white; |
| 38 | } |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 39 | } |
| 40 | |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 41 | // Global style for all button link |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 42 | .btn-link { |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 43 | font-weight: $headings-font-weight; |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 44 | fill: theme-color("primary"); |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 45 | text-decoration: none !important; |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 46 | &:hover { |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 47 | background-color: gray("200"); |
| 48 | color: theme-color("primary"); |
| 49 | } |
| 50 | &:active { |
| 51 | background-color: gray("300"); |
| 52 | } |
| 53 | &:focus { |
| 54 | box-shadow: inset 0 0 0 2px theme-color("primary"); |
| 55 | color: theme-color("primary"); |
| 56 | outline: none; |
| 57 | } |
| 58 | &:disabled { |
| 59 | box-shadow: $btn-focus-box-shadow; |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 60 | } |
Derick Montague | 3f6710a | 2020-03-04 00:59:47 -0600 | [diff] [blame] | 61 | } |
| 62 | |
SurenNeware | dc618a8 | 2020-08-17 18:42:20 +0530 | [diff] [blame] | 63 | // Datepicker and Password toggle buttons |
| 64 | .input-action { |
| 65 | position: absolute; |
| 66 | right: 0; |
| 67 | } |
| 68 | .input-action .btn-link, |
| 69 | .input-action-btn { |
| 70 | position: absolute; |
| 71 | right: 1px; |
| 72 | top: 1px; |
| 73 | z-index: $zindex-dropdown + 1; |
| 74 | padding: 0; |
| 75 | width: 36px; |
| 76 | height: 35.8px; |
| 77 | svg { |
| 78 | vertical-align: sub; |
Derick Montague | 3f6710a | 2020-03-04 00:59:47 -0600 | [diff] [blame] | 79 | } |
Yoshie Muranaka | 996d2d5 | 2019-12-30 09:06:45 -0800 | [diff] [blame] | 80 | } |