Skip to content

Commit fcd9852

Browse files
committed
tackle to mixed-decls
1 parent 4d1425c commit fcd9852

File tree

4 files changed

+51
-30
lines changed

4 files changed

+51
-30
lines changed

packages/hashi/hs-badge/_badge-base.scss

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,33 @@
3131
justify-content: center;
3232
align-items: center;
3333
@content;
34-
34+
3535
.hs-badge__label {
3636
font-family: hs-core.key-get('badge-family');
3737
font-size: hs-core.key-get('badge-size');
3838
font-weight: hs-core.key-get('badge-weight');
3939
line-height: hs-core.key-get('badge-line-height');
4040
}
41-
41+
4242
.hs-badge__icon {
4343
display: flex;
4444
align-items: center;
4545
@include hs-core.color-ink('badge-icon', currentColor);
4646
@include hs-core.typography-size('badge-icon', hs-core.to-rem(22px));
4747
/* @fallback */
48-
width: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
49-
height: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
50-
48+
& {
49+
width: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
50+
height: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
51+
}
52+
5153
> * {
5254
@include hs-core.color-ink('badge-icon', currentColor);
5355
@include hs-core.typography-size('badge-icon', hs-core.to-rem(22px));
5456
/* @fallback */
55-
width: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
56-
height: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
57+
& {
58+
width: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
59+
height: hs-core.key-create('badge-icon-size', hs-core.to-rem(22px));
60+
}
5761
}
5862
}
5963
}

packages/hashi/hs-button/_button-base.scss

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,29 @@
3636
));
3737
@include hs-core.shape-height('button', max-content);
3838

39-
display: inline-flex;
40-
justify-content: center;
41-
align-items: center;
39+
& {
40+
display: inline-flex;
41+
justify-content: center;
42+
align-items: center;
43+
44+
user-select: none;
45+
overflow: visible;
46+
vertical-align: middle;
47+
box-sizing: border-box;
48+
cursor: pointer;
4249

43-
user-select: none;
44-
overflow: visible;
45-
vertical-align: middle;
46-
box-sizing: border-box;
47-
cursor: pointer;
50+
-webkit-appearance: caret;
51+
}
4852

49-
-webkit-appearance: caret;
5053
@include hs-core.prefix(transition, all var(--hs-transition-time) ease);
5154

5255
@content;
5356

54-
::-moz-focus-inner {
55-
padding: 0;
56-
border-style: none;
57+
& {
58+
::-moz-focus-inner {
59+
padding: 0;
60+
border-style: none;
61+
}
5762
}
5863

5964
& > * + * {
@@ -66,15 +71,19 @@
6671
@include hs-core.color-ink('button-icon', $icon-ink);
6772
@include hs-core.typography-size('button-icon', hs-core.to-rem(20px));
6873
/* @fallback */
69-
width: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
70-
height: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
74+
& {
75+
width: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
76+
height: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
77+
}
7178

7279
> * {
7380
@include hs-core.color-ink('button-icon', $icon-ink);
7481
@include hs-core.typography-size('button-icon', hs-core.to-rem(20px));
7582
/* @fallback */
76-
width: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
77-
height: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
83+
& {
84+
width: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
85+
height: hs-core.key-create('button-icon-size', hs-core.to-rem(20px));
86+
}
7887
}
7988
}
8089

@@ -86,8 +95,10 @@
8695
@include hs-core.typography-size('button-label', inherit);
8796
@include hs-core.typography-weight('button-label', inherit);
8897
@include hs-core.typography-line-height('button-label', inherit);
89-
text-align: center;
90-
letter-spacing: 0.02rem;
98+
& {
99+
text-align: center;
100+
letter-spacing: 0.02rem;
101+
}
91102
}
92103
}
93104

packages/hashi/hs-core/theme/_theme-properties.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ $_valid-intents: (
3333
@mixin property($property, $values, $intent: 'create') {
3434
$key: list.nth($values, 1);
3535
$value: list.nth($values, 2);
36-
36+
3737
@if not list.index($_valid-intents, $intent) {
3838
@error "Invalid intent: #{$intent}. Please use a valid intent: #{$_valid-intents}.";
3939
}
40-
40+
4141
@if $intent == 'bind' {
42-
@include key.bind($key, $value);
42+
& {
43+
@include key.bind($key, $value);
44+
}
4345
} @else if $intent == 'create' {
44-
#{$property}: key.create($key, $value);
46+
& {
47+
#{$property}: key.create($key, $value);
48+
}
4549
}
4650
}

packages/hashi/hs-dialog/_dialog-base.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
radius: $radius,
4242
shadow: 'normal'
4343
));
44-
overflow: hidden;
44+
& {
45+
overflow: hidden;
46+
}
4547

4648
.hs-dialog__header {
4749
// width: 100%;

0 commit comments

Comments
 (0)