Skip to content

Commit c8d916a

Browse files
authored
Merge pull request #532 from gselderslaghs/button-components-fix-and-indentation
fix/enhancement(Button) component fix and indentation
2 parents cefdbf8 + c30c715 commit c8d916a

File tree

1 file changed

+44
-12
lines changed

1 file changed

+44
-12
lines changed

sass/components/_buttons.scss

+44-12
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
border-radius: var(--btn-border-radius);
1313
padding-left: var(--btn-padding);
1414
padding-right: var(--btn-padding);
15-
font-size: ver(--btn-font-size);
15+
font-size: var(--btn-font-size);
1616
font-weight: 500;
1717
text-decoration: none;
1818
display: inline-flex;
@@ -29,19 +29,24 @@
2929
.btn.icon-left, .btn.icon-right {
3030
position: relative;
3131
}
32+
3233
.btn.icon-left {
3334
padding-left: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
3435
}
36+
3537
.btn.icon-right {
36-
padding-right: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
38+
padding-right: calc(var(--btn-padding-icon) + var(--btn-font-size-icon) + var(--btn-gap-icon));
3739
}
40+
3841
.btn.icon-left i, .btn.icon-right i {
3942
position: absolute;
4043
font-size: var(--btn-font-size-icon);
4144
}
45+
4246
.btn.icon-left i {
4347
left: var(--btn-padding-icon);
4448
}
49+
4550
.btn.icon-right i {
4651
right: var(--btn-padding-icon);
4752
}
@@ -80,12 +85,10 @@
8085

8186
.btn.disabled, .btn-floating.disabled, .btn-large.disabled, .btn-small.disabled, .btn-flat.disabled,
8287
.btn:disabled, .btn-floating:disabled, .btn-large:disabled, .btn-small:disabled, .btn-flat:disabled,
83-
.btn[disabled], .btn-floating[disabled], .btn-large[disabled], .btn-small[disabled], .btn-flat[disabled]
84-
{
88+
.btn[disabled], .btn-floating[disabled], .btn-large[disabled], .btn-small[disabled], .btn-flat[disabled] {
8589
@extend .z-depth-0;
8690
color: color-mix(in srgb, transparent, var(--md-sys-color-on-surface) 76%);
8791
background-color: color-mix(in srgb, transparent, var(--md-sys-color-on-surface) 24%);
88-
8992
pointer-events: none;
9093
box-shadow: none;
9194
cursor: default;
@@ -158,8 +161,7 @@
158161
&.elevated,
159162
&.tonal,
160163
&.outlined,
161-
&.text
162-
{
164+
&.text {
163165
outline: 3px solid var(--md-sys-color-secondary);
164166
outline-offset: 2px;
165167
}
@@ -190,10 +192,12 @@
190192
@extend .z-depth-1-half;
191193
background-color: color-mix(in srgb, var(--md-sys-color-primary-container), var(--md-sys-color-on-primary-container) 16%);
192194
}
195+
193196
&:focus {
194197
background-color: $button-floating-background-focus;
195198
@extend .z-depth-1-half;
196199
}
200+
197201
&:before {
198202
border-radius: 0;
199203
}
@@ -202,21 +206,24 @@
202206
&.halfway-fab {
203207
bottom: -56px * 0.5;
204208
}
209+
205210
width: 56px;
206211
height: 56px;
207212
padding: 0;
208-
// font-size:
213+
// font-size:
209214
// i {
210215
// // line-height: 56px;
211216
// }
212217
}
213218

214219
&.btn-small {
215220
--btn-small-height: calc(0.75 * var(--btn-height));
221+
216222
&.halfway-fab {
217223
bottom: calc(var(--btn-small-height) * -0.5);
218224
}
219-
width: var(--btn-small-height)e;
225+
226+
width: var(--btn-small-height);
220227
height: var(--btn-small-height);
221228
// i {
222229
// line-height: $button-floating-small-size;
@@ -228,10 +235,12 @@
228235
right: auto;
229236
left: 24px;
230237
}
238+
231239
position: absolute;
232240
right: 24px;
233241
bottom: -$button-floating-size * 0.5;
234242
}
243+
235244
// FIXES
236245
// width: unset;
237246
// padding: 16px !important;
@@ -262,24 +271,27 @@
262271
text-align: center;
263272
}
264273
}
274+
265275
// button fix
266276
button.btn-floating {
267277
border: none;
268278
}
279+
269280
// Fixed Action Button
270281
.fixed-action-btn {
271282
&.active {
272283
ul {
273284
visibility: visible;
274285
padding-left: 0;
275-
list-style-type: none;
286+
list-style-type: none;
276287
}
277288
}
278289

279290
// Directions
280291
&.direction-left,
281292
&.direction-right {
282293
padding: 0 0 0 15px;
294+
283295
ul {
284296
text-align: right;
285297
right: 64px;
@@ -289,55 +301,67 @@ button.btn-floating {
289301
left: auto;
290302
/*width 100% only goes to width of button container */
291303
width: 500px;
304+
292305
li {
293306
display: inline-block;
294307
margin: 7.5px 15px 0 0;
295308
}
296309
}
297310
}
311+
298312
&.direction-right {
299313
padding: 0 15px 0 0;
314+
300315
ul {
301316
text-align: left;
302317
direction: rtl;
303318
left: 64px;
304319
right: auto;
320+
305321
li {
306322
margin: 7.5px 0 0 15px;
307323
}
308324
}
309325
}
326+
310327
&.direction-bottom {
311328
padding: 0 0 15px 0;
329+
312330
ul {
313331
top: 64px;
314332
bottom: auto;
315333
display: flex;
316334
flex-direction: column-reverse;
335+
317336
li {
318337
margin: 15px 0 0 0;
319338
}
320339
}
321340
}
341+
322342
&.toolbar {
323343
&.active {
324-
&>a i {
344+
& > a i {
325345
opacity: 0;
326346
}
327347
}
348+
328349
padding: 0;
329350
height: 56px;
351+
330352
ul {
331353
display: flex;
332354
top: 0;
333355
bottom: 0;
334356
z-index: 1;
357+
335358
li {
336359
flex: 1;
337360
display: inline-block;
338361
margin: 0;
339362
height: 100%;
340363
transition: none;
364+
341365
a {
342366
display: block;
343367
overflow: hidden;
@@ -349,19 +373,22 @@ button.btn-floating {
349373
color: $button-floating-color;
350374
line-height: 56px;
351375
z-index: 1;
376+
352377
i {
353378
line-height: inherit;
354379
}
355380
}
356381
}
357382
}
358383
}
384+
359385
position: fixed;
360386
right: 23px;
361387
bottom: 23px;
362388
padding-top: 15px;
363389
margin-bottom: 0;
364390
z-index: 997;
391+
365392
ul {
366393
left: 0;
367394
right: 0;
@@ -370,13 +397,16 @@ button.btn-floating {
370397
bottom: 64px;
371398
margin: 0;
372399
visibility: hidden;
400+
373401
li {
374402
margin-bottom: 15px;
375403
}
404+
376405
a.btn-floating {
377406
opacity: 0;
378407
}
379408
}
409+
380410
.fab-backdrop {
381411
position: absolute;
382412
top: 0;
@@ -398,6 +428,7 @@ button.btn-floating {
398428
height: calc(1.5 * var(--btn-height));
399429
font-size: 18px;
400430
padding: 0 28px;
431+
401432
i {
402433
font-size: 1.6rem;
403434
}
@@ -408,6 +439,7 @@ button.btn-floating {
408439
@extend .btn;
409440
height: calc(0.75 * var(--btn-height));
410441
font-size: 13px;
442+
411443
i {
412444
font-size: 1.2rem;
413445
}
@@ -420,4 +452,4 @@ button.btn-floating {
420452

421453
.btn.rounded {
422454
border-radius: 99999px;
423-
}
455+
}

0 commit comments

Comments
 (0)