Skip to content

Commit eb5e20b

Browse files
style(design): revise scss linting configuration (#3357)
Co-authored-by: Damien Retzinger <[email protected]>
1 parent a8ea9b1 commit eb5e20b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+227
-192
lines changed

.stylelintrc

+4-13
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"function-comma-space-before": "never",
1414
"function-name-case": "lower",
1515
"function-url-quotes": "always",
16-
"function-url-scheme-blacklist": [
16+
"function-url-scheme-disallowed-list": [
1717
"data"
1818
],
1919
"function-whitespace-after": "always",
@@ -24,10 +24,11 @@
2424
"string-quotes": "single",
2525
"unit-case": "lower",
2626
"unit-no-unknown": true,
27-
"unit-whitelist": [
27+
"unit-allowed-list": [
2828
"px",
2929
"%",
3030
"deg",
31+
"dvh",
3132
"ms",
3233
"rem",
3334
"em",
@@ -55,16 +56,6 @@
5556
"declaration-block-semicolon-space-after": "always-single-line",
5657
"declaration-block-semicolon-newline-before": "never-multi-line",
5758
"declaration-block-semicolon-newline-after": "always-multi-line",
58-
"declaration-property-value-blacklist": [
59-
{
60-
"/.*/": [
61-
"initial"
62-
]
63-
},
64-
{
65-
"message": "The `initial` value is not supported in IE."
66-
}
67-
],
6859
"declaration-no-important": true,
6960
"declaration-empty-line-before":"never",
7061
"block-no-empty": true,
@@ -93,7 +84,7 @@
9384
"indentation": "tab",
9485
"linebreaks": "unix",
9586
"selector-class-pattern": [
96-
"^_?(daff-|demo-|daffio-)",
87+
"(^_?(daff-|demo-|daffio-))|(^(active|horizontal|vertical|left|right|disabled|hidden)$)",
9788
{
9889
"resolveNestedSelectors": true
9990
}

libs/design/accordion/src/accordion-theme.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
&:last-child {
1313
border-bottom: 1px solid theming.daff-illuminate($base, $neutral, 2);
1414
}
15-
15+
1616
&__header {
17-
&:after {
17+
&::after {
1818
border-color: currentColor;
1919
}
2020
}

libs/design/accordion/src/accordion/accordion-item/accordion-item.component.scss

+13-13
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@
1919
position: relative;
2020

2121
&::after {
22-
content: '';
23-
position: absolute;
24-
top: 48%;
25-
right: 2px;
26-
display: inline-block;
27-
border-right: 2px solid currentColor;
28-
border-bottom: 2px solid currentColor;
29-
width: 8px;
30-
height: 8px;
31-
transform: translateY(-50%) rotate(45deg);
32-
transition: transform 150ms;
33-
}
22+
content: '';
23+
position: absolute;
24+
top: 48%;
25+
right: 2px;
26+
display: inline-block;
27+
border-right: 2px solid currentColor;
28+
border-bottom: 2px solid currentColor;
29+
width: 8px;
30+
height: 8px;
31+
transform: translateY(-50%) rotate(45deg);
32+
transition: transform 150ms;
33+
}
3434
}
3535

3636
&.daff-open {
3737
#{$root}__header {
38-
&:after {
38+
&::after {
3939
top: 56%;
4040
transform: translateY(-50%) rotate(225deg);
4141
}

libs/design/button/src/button/basic/button-theme.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
background-color: $base-color;
1111
color: theming.daff-text-contrast($base-color);
1212

13-
&:after {
13+
&::after {
1414
background: $hover-color;
1515
}
1616

@@ -21,7 +21,7 @@
2121
&:active {
2222
color: theming.daff-text-contrast($active-color);
2323

24-
&:after {
24+
&::after {
2525
background: $active-color;
2626
}
2727
}

libs/design/button/src/button/button-base.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
}
3636

3737
@mixin daff-button-background($border-radius) {
38-
&:after {
38+
&::after {
3939
content: '';
4040
border-radius: $border-radius;
4141
position: absolute;
@@ -47,7 +47,7 @@
4747

4848
&:hover,
4949
&:active {
50-
&:after {
50+
&::after {
5151
opacity: 1;
5252
}
5353
}
@@ -76,4 +76,4 @@
7676
height: 3.5rem;
7777
padding: 0 1.5rem;
7878
}
79-
}
79+
}

libs/design/button/src/button/flat/flat-theme.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
) {
99
color: $base-color;
1010

11-
&:after {
11+
&::after {
1212
background-color: $base-color;
1313
}
1414

@@ -19,7 +19,7 @@
1919
&:active {
2020
color: theming.daff-text-contrast($active-color);
2121

22-
&:after {
22+
&::after {
2323
background-color: $active-color;
2424
}
2525
}
@@ -42,12 +42,12 @@
4242
.daff-flat-button {
4343
color: currentColor;
4444

45-
&:after {
45+
&::after {
4646
background-color: theming.daff-illuminate($base, $neutral, 2);
4747
}
4848

4949
&:active {
50-
&:after {
50+
&::after {
5151
background-color: theming.daff-illuminate($base, $neutral, 3);
5252
}
5353
}
@@ -113,7 +113,7 @@
113113
&:hover,
114114
&:focus,
115115
&:active {
116-
&:after {
116+
&::after {
117117
background: transparent;
118118
}
119119
}

libs/design/button/src/button/flat/flat.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
@include base.daff-button-sizes();
77
background: none;
88
border: none;
9-
}
9+
}

libs/design/button/src/button/icon/icon.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
height: 3.5rem;
2828
width: 3.5rem;
2929
}
30-
}
30+
}

libs/design/button/src/button/raised/raised-theme.scss

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414
}
1515

1616
$black: theming.daff-color(theming.$daff-neutral, 110);
17-
1817
background-color: $base-color;
1918
border: 1px solid $base-color;
2019
box-shadow:
2120
0 3px 5px rgba($black, 0.12),
2221
0 1px 3px rgba($black, 0.08);
2322
color: theming.daff-text-contrast($base-color);
2423

25-
&:after {
24+
&::after {
2625
box-shadow:
2726
0 6px 12px rgba($black, 0.08),
2827
0 4px 6px rgba($black, 0.04);
@@ -94,7 +93,7 @@
9493
);
9594
color: theming.daff-illuminate($base, $neutral, 5);
9695

97-
&:after {
96+
&::after {
9897
box-shadow: none;
9998
}
10099
}

libs/design/button/src/button/raised/raised.component.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
.daff-raised-button {
44
@include base.daff-button-base();
5-
@include base.daff-button-background(0px);
5+
@include base.daff-button-background(0);
66
@include base.daff-button-sizes();
7-
}
7+
}

libs/design/button/src/button/stroked/stroked-theme.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
color: $base-color;
1111
background-color: transparent;
1212

13-
&:after {
13+
&::after {
1414
background-color: $base-color;
1515
}
1616

@@ -22,7 +22,7 @@
2222
border: 1px solid $active-color;
2323
color: theming.daff-text-contrast($active-color);
2424

25-
&:after {
25+
&::after {
2626
background-color: $active-color;
2727
}
2828
}
@@ -47,7 +47,7 @@
4747
border: 1px solid theming.daff-illuminate($base, $neutral, 5);
4848
color: currentColor;
4949

50-
&:after {
50+
&::after {
5151
background: theming.daff-illuminate($base, $neutral, 2);
5252
}
5353

@@ -64,7 +64,7 @@
6464
theming.daff-illuminate($base, $neutral, 3)
6565
);
6666

67-
&:after {
67+
&::after {
6868
background: theming.daff-illuminate($base, $neutral, 3);
6969
}
7070
}
@@ -127,7 +127,7 @@
127127
&:hover {
128128
color: theming.daff-illuminate($base, $neutral, 5);
129129

130-
&:after {
130+
&::after {
131131
background-color: transparent;
132132
opacity: 0;
133133
}

libs/design/button/src/button/stroked/stroked.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
@include base.daff-button-base();
55
@include base.daff-button-background(3px);
66
@include base.daff-button-sizes();
7-
}
7+
}

libs/design/button/src/button/underline/underline.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@
7979
to {
8080
transform: translateX(0);
8181
}
82-
}
82+
}

libs/design/card/src/card-theme-variants/linkable-card.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$hover-color,
55
) {
66
.daff-card__wrapper {
7-
&:after {
7+
&::after {
88
background: $hover-color;
99
}
1010
}

libs/design/card/src/card-theme.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160

161161
&.daff-raised-card {
162162
.daff-card__wrapper {
163-
&:after {
163+
&::after {
164164
box-shadow: 0 16px 32px -4px rgba($black, 0.12),
165165
0 8px 12px -2px rgba($black, 0.06);
166166
}

libs/design/card/src/card/card.component.scss

+11-7
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ a {
101101
$root: &;
102102
text-decoration: none;
103103

104-
.daff-card__image + .daff-card__wrapper {
105-
&::after {
106-
border-radius: 0 0 $card-border-radius $card-border-radius;
104+
.daff-card__image {
105+
+ .daff-card__wrapper {
106+
&::after {
107+
border-radius: 0 0 $card-border-radius $card-border-radius;
108+
}
107109
}
108110
}
109111

@@ -124,11 +126,13 @@ a {
124126
z-index: 1;
125127
}
126128
}
127-
129+
128130
&.daff-card--horizontal {
129-
.daff-card__image + .daff-card__wrapper {
130-
&::after {
131-
border-radius: 0 $card-border-radius $card-border-radius 0;
131+
.daff-card__image {
132+
+ .daff-card__wrapper {
133+
&::after {
134+
border-radius: 0 $card-border-radius $card-border-radius 0;
135+
}
132136
}
133137
}
134138
}

libs/design/list/src/list-theme.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
@use '../../scss/core';
33
@use '../../scss/theming';
44

5+
// styleline-disable selector-class-pattern
56
@mixin daff-list-theme($theme) {
67
$neutral: core.daff-map-deep-get($theme, 'core.neutral');
78
$base: core.daff-map-deep-get($theme, 'core.base');
@@ -23,13 +24,13 @@
2324

2425
.daff-nav-list {
2526
.daff-list-item {
26-
&:after {
27+
&::after {
2728
background-color: $base;
2829
}
2930

3031
&:hover,
3132
&.active {
32-
&:after {
33+
&::after {
3334
background-color: theming.daff-illuminate($base, $neutral, 2);
3435
}
3536
}

0 commit comments

Comments
 (0)