|
4 | 4 |
|
5 | 5 | > * + * { |
6 | 6 | // ensure white space between children |
7 | | - margin-left: 0.5rem; |
| 7 | + margin-left: $rax-spacing-200; |
8 | 8 | } |
9 | 9 |
|
10 | 10 | &:focus { |
|
29 | 29 |
|
30 | 30 | @mixin hxButton--reset { |
31 | 31 | background-color: transparent; |
32 | | - border: 0; |
| 32 | + border: $rax-spacing-0; |
33 | 33 | color: inherit; |
34 | 34 | cursor: pointer; |
35 | 35 | display: inline-block; |
36 | 36 | font: inherit; |
37 | | - font-size: 0.875rem; |
38 | | - font-weight: 700; // bold |
39 | | - line-height: 1; |
40 | | - margin: 0; |
41 | | - padding: 0; |
| 37 | + font-size: $rax-component-button-base-font-size; |
| 38 | + font-weight: $rax-font-weight-bold; // bold (700) |
| 39 | + line-height: $rax-line-height-none; |
| 40 | + margin: $rax-spacing-0; |
| 41 | + padding: $rax-spacing-0; |
42 | 42 | } |
43 | 43 |
|
44 | 44 | /// ============================= /// |
|
65 | 65 | @if $size == small { |
66 | 66 | padding: 0.125rem 0.5rem; |
67 | 67 | } @else if $size == medium { |
68 | | - font-size: 0.875rem; |
69 | | - padding: 0.5rem 0.75rem; |
| 68 | + font-size: $rax-component-button-base-font-size; |
| 69 | + padding: $rax-component-button-base-vertical-padding $rax-component-button-base-horizontal-padding; |
70 | 70 | } @else if $size == large { |
71 | 71 | font-size: 1rem; |
72 | | - padding: 1rem; |
| 72 | + padding: $rax-spacing-400; |
73 | 73 | } @else { |
74 | 74 | // no additional styles |
75 | 75 | } |
76 | 76 | } |
77 | 77 |
|
78 | | -/// ------------------------------------ /// |
79 | | -/// ---------- PRIMARY BUTTON ---------- /// |
80 | | -/// ------------------------------------ /// |
| 78 | +/// --------------------------------------------- /// |
| 79 | +/// ---------- PRIMARY (FILLED) BUTTON ---------- /// |
| 80 | +/// --------------------------------------------- /// |
81 | 81 |
|
82 | 82 | @mixin hxButton--primary { |
83 | | - background-color: $blue-500; |
| 83 | + background-color: $rax-component-button-filled-default-background-color; |
84 | 84 | border: none; |
85 | | - color: $gray-0; |
| 85 | + color: $rax-component-button-filled-default-color; |
86 | 86 |
|
87 | 87 | &:hover { |
88 | 88 | @include hxButton-hover--primary; |
|
102 | 102 | } |
103 | 103 |
|
104 | 104 | @mixin hxButton-active--primary { |
105 | | - background-color: $blue-900; |
106 | | - color: $gray-0; |
| 105 | + background-color: $rax-component-button-filled-active-background-color; |
| 106 | + color: $rax-component-button-filled-active-color; |
107 | 107 | } |
108 | 108 |
|
109 | 109 | @mixin hxButton-disabled--primary { |
110 | | - background-color: $gray-500; |
111 | | - color: $gray-0; |
| 110 | + background-color: $rax-component-button-filled-disabled-background-color; |
| 111 | + color: $rax-component-button-filled-disabled-color; |
112 | 112 | } |
113 | 113 |
|
114 | 114 | @mixin hxButton-focus--primary { |
115 | | - box-shadow: 0 0 4px rgba($blue-700, 0.5); |
| 115 | + background-color: $rax-component-button-filled-focus-background-color; |
| 116 | + color: $rax-component-button-filled-focus-color; |
116 | 117 | outline: none; |
117 | 118 | } |
118 | 119 |
|
119 | 120 | @mixin hxButton-hover--primary { |
120 | | - background-color: $blue-700; |
| 121 | + background-color: $rax-component-button-filled-hover-background-color; |
121 | 122 | border: none; |
122 | | - color: $gray-0; |
| 123 | + color: $rax-component-button-filled-hover-color; |
123 | 124 | } |
124 | 125 |
|
125 | | -/// -------------------------------------- /// |
126 | | -/// ---------- SECONDARY BUTTON ---------- /// |
127 | | -/// -------------------------------------- /// |
| 126 | +/// ------------------------------------------------ /// |
| 127 | +/// ---------- SECONDARY (OUTLINE) BUTTON ---------- /// |
| 128 | +/// ------------------------------------------------ /// |
128 | 129 |
|
129 | 130 | @mixin hxButton--secondary { |
130 | | - background-color: transparent; |
131 | | - border: 1px solid $blue-500; |
132 | | - color: $blue-500; |
| 131 | + background-color: $rax-component-button-outline-default-background-color; |
| 132 | + border: 1px solid $rax-component-button-outline-default-border-color; |
| 133 | + color: $rax-component-button-outline-default-color; |
133 | 134 |
|
134 | 135 | &:hover { |
135 | 136 | @include hxButton-hover--secondary; |
|
149 | 150 | } |
150 | 151 |
|
151 | 152 | @mixin hxButton-active--secondary { |
152 | | - background-color: transparent; |
153 | | - border: 1px solid $blue-900; |
154 | | - color: $blue-900; |
| 153 | + background-color: $rax-component-button-outline-default-background-color; |
| 154 | + border-color: $rax-component-button-outline-active-border-color; |
| 155 | + border-style: $rax-component-button-base-border-style; |
| 156 | + border-width: $rax-component-button-base-border-width; |
| 157 | + color: $rax-component-button-outline-active-color; |
155 | 158 | } |
156 | 159 |
|
157 | 160 | @mixin hxButton-disabled--secondary { |
158 | | - background-color: transparent; |
159 | | - border: 1px solid $gray-500; |
160 | | - color: $gray-500; |
| 161 | + background-color: $rax-component-button-outline-disabled-background-color; |
| 162 | + border: 1px solid $rax-component-button-outline-disabled-border-color; |
| 163 | + color: $rax-component-button-outline-disabled-color; |
161 | 164 | } |
162 | 165 |
|
163 | 166 | @mixin hxButton-focus--secondary { |
164 | | - box-shadow: 0 0 4px rgba($blue-700, 0.5); |
| 167 | + background-color: $rax-component-button-outline-focus-background-color; |
| 168 | + border: 1px solid $rax-component-button-outline-focus-border-color; |
| 169 | + color: $rax-component-button-outline-focus-color; |
165 | 170 | } |
166 | 171 |
|
167 | 172 | @mixin hxButton-hover--secondary { |
168 | | - background-color: transparent; |
169 | | - border: 1px solid $blue-700; |
170 | | - color: $blue-700; |
| 173 | + background-color: $rax-component-button-outline-hover-background-color; |
| 174 | + border: 1px solid $rax-component-button-outline-focus-border-color; |
| 175 | + color: $rax-component-button-outline-focus-color; |
171 | 176 | } |
172 | 177 |
|
173 | | -/// ------------------------------------- /// |
174 | | -/// ---------- TERTIARY BUTTON ---------- /// |
175 | | -/// ------------------------------------- /// |
| 178 | +/// --------------------------------------------- /// |
| 179 | +/// ---------- TERTIARY (PLAIN) BUTTON ---------- /// |
| 180 | +/// --------------------------------------------- /// |
176 | 181 |
|
177 | 182 | @mixin hxButton--tertiary { |
178 | | - background-color: transparent; |
| 183 | + background-color: $rax-component-button-plain-default-background-color; |
179 | 184 | border: none; |
180 | | - color: $blue-500; |
| 185 | + color: $rax-component-button-plain-default-color; |
181 | 186 | padding: 0; |
182 | 187 |
|
183 | 188 | // TODO: deprecated Button and Button Bar styles |
|
204 | 209 | } |
205 | 210 |
|
206 | 211 | @mixin hxButton-active--tertiary { |
207 | | - background-color: transparent; |
208 | | - border-color: transparent; |
209 | | - color: $blue-900; |
| 212 | + background-color: $rax-component-button-plain-active-background-color; |
| 213 | + border-color: $rax-component-button-plain-active-border-color; |
| 214 | + color: $rax-component-button-plain-active-color; |
210 | 215 | } |
211 | 216 |
|
212 | 217 | @mixin hxButton-disabled--tertiary { |
213 | | - background-color: transparent; |
214 | | - border-color: transparent; |
215 | | - color: $gray-500; |
| 218 | + background-color: $rax-component-button-plain-disabled-background-color; |
| 219 | + border-color: $rax-component-button-plain-disabled-border-color; |
| 220 | + color: $rax-component-button-plain-disabled-color; |
216 | 221 | } |
217 | 222 |
|
218 | 223 | @mixin hxButton-focus--tertiary { |
219 | | - box-shadow: 0 0 4px rgba($blue-700, 0.5); |
| 224 | + background-color: $rax-component-button-plain-focus-background-color; |
| 225 | + border-color: $rax-component-button-plain-focus-border-color; |
| 226 | + color: $rax-component-button-plain-focus-color; |
220 | 227 | outline: none; |
221 | 228 | } |
222 | 229 |
|
223 | 230 | @mixin hxButton-hover--tertiary { |
224 | | - background-color: transparent; |
225 | | - border-color: transparent; |
226 | | - color: $blue-700; |
| 231 | + background-color: $rax-component-button-plain-hover-background-color; |
| 232 | + border-color: $rax-component-button-plain-hover-border-color; |
| 233 | + color: $rax-component-button-plain-focus-color; |
227 | 234 | } |
0 commit comments