Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 46bcb9f

Browse files
committed
Merge pull request #215 from appirio-tech/tom-buttons
First v of new button spec
2 parents e03e14c + 5c68fd6 commit 46bcb9f

File tree

3 files changed

+148
-11
lines changed

3 files changed

+148
-11
lines changed

assets/css/partials/_colors.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ $ui-light-gray: #808285;
5353

5454
$ui-blue: #26A9E0;
5555
$ui-disabled-button-blue: #94D7ED;
56+
$button-gray: #d1d3d4;
5657
$ui-enabled-button-blue: #27a9e1;

assets/css/partials/_mixins.scss

Lines changed: 146 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@
121121
}
122122

123123
// Replace with classes from style guide, when it's finished
124-
@mixin button-s {
124+
@mixin button-s($background: $primary-color) {
125125
height: 20px;
126126
line-height: 20px;
127127
padding: 0 8px;
128128
border: none;
129129
border-radius: 3px;
130130
color: $white;
131-
background-color: $primary-color;
131+
background-color: $background;
132132
@include sofia-pro-regular;
133133
font-size: 11px;
134134
text-transform: uppercase;
@@ -137,16 +137,18 @@
137137
cursor: pointer;
138138
outline: 0;
139139
}
140-
@mixin button-m {
141-
@include button-s;
140+
141+
@mixin button-m($background: $primary-color) {
142+
@include button-s($background);
142143
height: 30px;
143144
line-height: 30px;
144145
padding: 0 15px;
145146
font-size: 14px;
146147
border-radius: 4px;
147148
}
148-
@mixin button-l {
149-
@include button-s;
149+
150+
@mixin button-l($background: $primary-color) {
151+
@include button-s($background);
150152
height: 50px;
151153
line-height: 50px;
152154
padding: 0 15px;
@@ -155,8 +157,9 @@
155157
border-radius: 4px;
156158

157159
}
158-
@mixin button-xl {
159-
@include button-s;
160+
161+
@mixin button-xl($background: $primary-color) {
162+
@include button-s($background);
160163
height: 60px;
161164
line-height: 60px;
162165
padding: 0 15px;
@@ -165,8 +168,9 @@
165168
border-radius: 4px;
166169

167170
}
168-
@mixin button-m-wide {
169-
@include button-m;
171+
172+
@mixin button-m-wide($background: $primary-color) {
173+
@include button-m($background);
170174
padding: 0 30px;
171175
}
172176

@@ -180,6 +184,138 @@
180184
border: 1px solid $primary-color;
181185
}
182186

187+
@mixin button-1($disabled: #b2e7fe, $normal: #1eaefc, $hover: #199ae2, $active: #1792d7) {
188+
@include button-s;
189+
background-color: $normal;
190+
&.disabled {
191+
background-color: $disabled;
192+
}
193+
&:hover {
194+
background-color: $hover;
195+
}
196+
&:active {
197+
background-color: $active;
198+
}
199+
}
200+
201+
@mixin button-1-m {
202+
@include button-1;
203+
@include button-m(#1eaefc);
204+
}
205+
206+
@mixin button-1-m-wide {
207+
@include button-1;
208+
@include button-m-wide(#1eaefc);
209+
}
210+
211+
@mixin button-1-l {
212+
@include button-1;
213+
@include button-l(#1eaefc);
214+
}
215+
216+
@mixin button-1-xl {
217+
@include button-1;
218+
@include button-xl(#1eaefc);
219+
}
220+
221+
@mixin button-2 {
222+
@include button-1(#edeeee, #d1d3d4, #1eaefc)
223+
}
224+
225+
@mixin button-2-m {
226+
@include button-2;
227+
@include button-m(#d1d3d4);
228+
}
229+
230+
@mixin button-2-m-wide {
231+
@include button-2;
232+
@include button-m-wide(#d1d3d4);
233+
}
234+
235+
@mixin button-2-l {
236+
@include button-2;
237+
@include button-l(#d1d3d4);
238+
}
239+
240+
@mixin button-2-xl {
241+
@include button-2;
242+
@include button-xl(#d1d3d4);
243+
}
244+
245+
@mixin button-border($disabled, $normal, $hover, $hover-fill: white, $fill: $normal) {
246+
background-color: white;
247+
color: $fill;
248+
border: 1px solid $normal;
249+
&.disabled {
250+
border: 1px solid $disabled;
251+
}
252+
&:hover {
253+
border: 1px solid $hover;
254+
color: $hover-fill;
255+
}
256+
&:active {
257+
color: white;
258+
}
259+
}
260+
261+
@mixin button-3 {
262+
@include button-1(white, white, #1eaefc, #1893d8);
263+
@include button-border(#dedede, #1eaefc, #1eaefc);
264+
}
265+
266+
@mixin button-3-m {
267+
@include button-3;
268+
@include button-m(#edeeee);
269+
@include button-border(#dedede, #1eaefc, #1eaefc);
270+
}
271+
272+
@mixin button-3-m-wide {
273+
@include button-3;
274+
@include button-m-wide(#edeeee);
275+
@include button-border(#dedede, #1eaefc, #1eaefc);
276+
}
277+
278+
@mixin button-3-l {
279+
@include button-3;
280+
@include button-l(white);
281+
@include button-border(#dedede, #1eaefc, #1eaefc);
282+
}
283+
284+
@mixin button-3-xl {
285+
@include button-3;
286+
@include button-xl(#edeeee);
287+
@include button-border(#dedede, #1eaefc, #1eaefc);
288+
}
289+
290+
@mixin button-4 {
291+
@include button-1(white, white, white, #1893d8);
292+
@include button-border(#dedede, #dedede, #1eaefc, #1eaefc, #83d7fc);
293+
}
294+
295+
@mixin button-4-m {
296+
@include button-4;
297+
@include button-m(#edeeee);
298+
@include button-border(#dedede, #dedede, #1eaefc, #1eaefc, #83d7fc);
299+
}
300+
301+
@mixin button-4-m-wide {
302+
@include button-4;
303+
@include button-m-wide(#edeeee);
304+
@include button-border(#dedede, #dedede, #1eaefc, #1eaefc, #83d7fc);
305+
}
306+
307+
@mixin button-4-l {
308+
@include button-4;
309+
@include button-l(#edeeee);
310+
@include button-border(#dedede, #dedede, #1eaefc, #1eaefc, #83d7fc);
311+
}
312+
313+
@mixin button-4-xl {
314+
@include button-4;
315+
@include button-xl(#edeeee);
316+
@include button-border(#dedede, #dedede, #1eaefc, #1eaefc, #83d7fc);
317+
}
318+
183319
@mixin module-s {
184320
margin-top: 6px;
185321
background-color: $white;

assets/css/profile/about.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
margin-top: 20px;
153153
margin-left: auto;
154154
margin-right: auto;
155-
@include button-l;
155+
@include button-2-l;
156156
}
157157
.list {
158158
display: flex;

0 commit comments

Comments
 (0)