Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 1 | $btn-primary__bg: $base-01--03; |
| 2 | $btn-primary__bg--hover: $base-01--04; |
| 3 | $btn-primary__bg--disabled: $base-02--04; |
| 4 | $btn-primary__txt: $base-02--08; |
| 5 | $btn-primary__txt--disabled: $base-02--03; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 6 | |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 7 | $btn-secondary__bg: $base-02--08; |
| 8 | $btn-secondary__txt: $base-01--03; |
| 9 | $btn-secondary__txt--hover: $base-01--04; |
| 10 | $btn-secondary__txt--disabled: $base-02--03; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 11 | |
| 12 | $btn-tertiary__bg: transparent; |
Yoshie Muranaka | 6f7ec80 | 2019-06-24 14:35:41 -0500 | [diff] [blame] | 13 | $btn-tertiary__txt: $base-01--03; |
| 14 | $btn-tertiary__txt--hover: $base-01--04; |
| 15 | $btn-tertiary__txt--disabled: $base-02--03; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 16 | |
| 17 | /*** |
| 18 | Include .btn class in addition to the button type. |
| 19 | These styles provide structural and base properties |
| 20 | shared across all buttons. The additional button |
| 21 | type (.btn-primary, .btn-secondary) will provide color |
| 22 | properties |
| 23 | ***/ |
| 24 | button, |
| 25 | .btn, |
| 26 | [type='button'] { |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 27 | @include fontFamilyBold; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 28 | @include fastTransition-all; |
| 29 | border-style: solid; |
| 30 | border-width: 2px; |
| 31 | border-color: transparent; |
| 32 | font-size: 1em; |
Michael Davis | 1947575 | 2017-02-23 18:30:23 -0600 | [diff] [blame] | 33 | text-transform: none; |
Yoshie Muranaka | 5bd1dec | 2019-05-16 13:06:32 -0500 | [diff] [blame] | 34 | border-radius: 0; |
| 35 | padding: .5em 1em; |
| 36 | line-height: 1; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 37 | display: inline-block; |
| 38 | cursor: pointer; |
| 39 | &[disabled], |
Iftekharul Islam | 8947e70 | 2017-07-27 10:28:07 -0500 | [diff] [blame] | 40 | &.disabled { |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 41 | opacity: 1; |
| 42 | cursor: default; |
Michael Davis | 1947575 | 2017-02-23 18:30:23 -0600 | [diff] [blame] | 43 | } |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 44 | &.full-width { |
| 45 | width: 100%; |
Michael Davis | 0f03ad1 | 2017-02-27 16:54:18 -0600 | [diff] [blame] | 46 | } |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 47 | .icon, |
beccabroek | 44da471 | 2019-03-20 13:24:23 -0500 | [diff] [blame] | 48 | i { |
| 49 | //button symbol |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 50 | font-style: normal; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 51 | font-weight: normal; |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 52 | text-transform: none; |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 53 | display: inline-block; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 54 | margin-right: 0.3em; |
| 55 | vertical-align: bottom; |
Yoshie Muranaka | fa56273 | 2019-07-17 11:23:15 -0500 | [diff] [blame^] | 56 | margin-left: -0.5em; |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 57 | } |
beccabroek | 44da471 | 2019-03-20 13:24:23 -0500 | [diff] [blame] | 58 | img { |
Yoshie Muranaka | 5bd1dec | 2019-05-16 13:06:32 -0500 | [diff] [blame] | 59 | width: 1.5em; |
| 60 | height: 1.5em; |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 61 | display: inline-block; |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 62 | margin-right: 0.5em; |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 63 | } |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 64 | svg { |
| 65 | height: 1.2em; |
| 66 | width: auto; |
beccabroek | 309b5da | 2018-11-07 12:22:31 -0600 | [diff] [blame] | 67 | max-width: 100%; |
Michael Davis | c562618 | 2017-03-10 15:48:05 -0600 | [diff] [blame] | 68 | } |
Michael Davis | 1947575 | 2017-02-23 18:30:23 -0600 | [diff] [blame] | 69 | } |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 70 | |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 71 | /*** |
| 72 | Use for the primary use-case/s that is non-destructive. |
| 73 | e.g. directing to a new page, a call to action |
| 74 | ***/ |
| 75 | .btn-primary { |
| 76 | background-color: $btn-primary__bg; |
| 77 | border-color: $btn-primary__bg; |
| 78 | color: $btn-primary__txt; |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 79 | &:hover { |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 80 | background-color: $btn-primary__bg--hover; |
| 81 | border-color: $btn-primary__bg--hover; |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 82 | } |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 83 | &[disabled], |
| 84 | &.disabled { |
| 85 | background: $btn-primary__bg--disabled; |
| 86 | border-color: $btn-primary__bg--disabled; |
| 87 | color: $btn-primary__txt--disabled; |
| 88 | .icon { |
| 89 | fill: $btn-primary__txt--disabled; |
| 90 | } |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 91 | } |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 92 | .icon { |
| 93 | fill: $btn-primary__txt; |
Michael Davis | 5194655 | 2017-05-01 10:30:38 -0500 | [diff] [blame] | 94 | } |
beccabroek | 44da471 | 2019-03-20 13:24:23 -0500 | [diff] [blame] | 95 | } |
Yoshie Muranaka | c86ce3c | 2019-06-05 12:30:30 -0500 | [diff] [blame] | 96 | |
| 97 | /*** |
| 98 | Secondary buttons are actions that fall secondary or |
| 99 | of less priority to primary buttons. |
| 100 | These usually come coupled with a primary. |
| 101 | ***/ |
| 102 | .btn-secondary { |
| 103 | background-color: $btn-secondary__bg; |
| 104 | border-color: $btn-secondary__txt; |
| 105 | color: $btn-secondary__txt; |
| 106 | &:hover { |
| 107 | background-color: $btn-secondary__bg; |
| 108 | border-color: $btn-secondary__txt--hover; |
| 109 | color: $btn-secondary__txt--hover; |
| 110 | .icon { |
| 111 | fill: $btn-secondary__txt--hover; |
| 112 | } |
| 113 | } |
| 114 | &[disabled], |
| 115 | &.disabled { |
| 116 | background-color: $btn-secondary__bg; |
| 117 | border-color: $btn-secondary__txt--disabled; |
| 118 | color: $btn-secondary__txt--disabled; |
| 119 | .icon { |
| 120 | fill: $btn-secondary__txt--disabled; |
| 121 | } |
| 122 | } |
| 123 | .icon { |
| 124 | fill: $btn-secondary__txt; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | /*** |
| 129 | Tertiary text buttons are used to identify less pressing or |
| 130 | optional actions given on a page. |
| 131 | ***/ |
| 132 | .btn-tertiary { |
| 133 | background-color: $btn-tertiary__bg; |
| 134 | border-color: $btn-tertiary__bg; |
| 135 | color: $btn-tertiary__txt; |
| 136 | &:hover { |
| 137 | color: $btn-tertiary__txt--hover; |
| 138 | .icon { |
| 139 | fill: $btn-tertiary__txt--hover; |
| 140 | } |
| 141 | } |
| 142 | &[disabled], |
| 143 | &.disabled { |
| 144 | color: $btn-tertiary__txt--disabled; |
| 145 | .icon { |
| 146 | fill: $btn-tertiary__txt--disabled; |
| 147 | } |
| 148 | } |
| 149 | .icon { |
| 150 | fill: $btn-tertiary__txt; |
| 151 | } |
| 152 | } |