Skip to content

Commit

Permalink
style(design): revise scss linting configuration (#3357)
Browse files Browse the repository at this point in the history
Co-authored-by: Damien Retzinger <damienwebdev@gmail.com>
  • Loading branch information
xelaint and damienwebdev authored Dec 12, 2024
1 parent a8ea9b1 commit eb5e20b
Show file tree
Hide file tree
Showing 46 changed files with 227 additions and 192 deletions.
17 changes: 4 additions & 13 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-url-quotes": "always",
"function-url-scheme-blacklist": [
"function-url-scheme-disallowed-list": [
"data"
],
"function-whitespace-after": "always",
Expand All @@ -24,10 +24,11 @@
"string-quotes": "single",
"unit-case": "lower",
"unit-no-unknown": true,
"unit-whitelist": [
"unit-allowed-list": [
"px",
"%",
"deg",
"dvh",
"ms",
"rem",
"em",
Expand Down Expand Up @@ -55,16 +56,6 @@
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-property-value-blacklist": [
{
"/.*/": [
"initial"
]
},
{
"message": "The `initial` value is not supported in IE."
}
],
"declaration-no-important": true,
"declaration-empty-line-before":"never",
"block-no-empty": true,
Expand Down Expand Up @@ -93,7 +84,7 @@
"indentation": "tab",
"linebreaks": "unix",
"selector-class-pattern": [
"^_?(daff-|demo-|daffio-)",
"(^_?(daff-|demo-|daffio-))|(^(active|horizontal|vertical|left|right|disabled|hidden)$)",
{
"resolveNestedSelectors": true
}
Expand Down
4 changes: 2 additions & 2 deletions libs/design/accordion/src/accordion-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
&:last-child {
border-bottom: 1px solid theming.daff-illuminate($base, $neutral, 2);
}

&__header {
&:after {
&::after {
border-color: currentColor;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
position: relative;

&::after {
content: '';
position: absolute;
top: 48%;
right: 2px;
display: inline-block;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
width: 8px;
height: 8px;
transform: translateY(-50%) rotate(45deg);
transition: transform 150ms;
}
content: '';
position: absolute;
top: 48%;
right: 2px;
display: inline-block;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
width: 8px;
height: 8px;
transform: translateY(-50%) rotate(45deg);
transition: transform 150ms;
}
}

&.daff-open {
#{$root}__header {
&:after {
&::after {
top: 56%;
transform: translateY(-50%) rotate(225deg);
}
Expand Down
4 changes: 2 additions & 2 deletions libs/design/button/src/button/basic/button-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
background-color: $base-color;
color: theming.daff-text-contrast($base-color);

&:after {
&::after {
background: $hover-color;
}

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

&:after {
&::after {
background: $active-color;
}
}
Expand Down
6 changes: 3 additions & 3 deletions libs/design/button/src/button/button-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
}

@mixin daff-button-background($border-radius) {
&:after {
&::after {
content: '';
border-radius: $border-radius;
position: absolute;
Expand All @@ -47,7 +47,7 @@

&:hover,
&:active {
&:after {
&::after {
opacity: 1;
}
}
Expand Down Expand Up @@ -76,4 +76,4 @@
height: 3.5rem;
padding: 0 1.5rem;
}
}
}
10 changes: 5 additions & 5 deletions libs/design/button/src/button/flat/flat-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
) {
color: $base-color;

&:after {
&::after {
background-color: $base-color;
}

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

&:after {
&::after {
background-color: $active-color;
}
}
Expand All @@ -42,12 +42,12 @@
.daff-flat-button {
color: currentColor;

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

&:active {
&:after {
&::after {
background-color: theming.daff-illuminate($base, $neutral, 3);
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@
&:hover,
&:focus,
&:active {
&:after {
&::after {
background: transparent;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/design/button/src/button/flat/flat.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
@include base.daff-button-sizes();
background: none;
border: none;
}
}
2 changes: 1 addition & 1 deletion libs/design/button/src/button/icon/icon.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
height: 3.5rem;
width: 3.5rem;
}
}
}
5 changes: 2 additions & 3 deletions libs/design/button/src/button/raised/raised-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
}

$black: theming.daff-color(theming.$daff-neutral, 110);

background-color: $base-color;
border: 1px solid $base-color;
box-shadow:
0 3px 5px rgba($black, 0.12),
0 1px 3px rgba($black, 0.08);
color: theming.daff-text-contrast($base-color);

&:after {
&::after {
box-shadow:
0 6px 12px rgba($black, 0.08),
0 4px 6px rgba($black, 0.04);
Expand Down Expand Up @@ -94,7 +93,7 @@
);
color: theming.daff-illuminate($base, $neutral, 5);

&:after {
&::after {
box-shadow: none;
}
}
Expand Down
4 changes: 2 additions & 2 deletions libs/design/button/src/button/raised/raised.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

.daff-raised-button {
@include base.daff-button-base();
@include base.daff-button-background(0px);
@include base.daff-button-background(0);
@include base.daff-button-sizes();
}
}
10 changes: 5 additions & 5 deletions libs/design/button/src/button/stroked/stroked-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
color: $base-color;
background-color: transparent;

&:after {
&::after {
background-color: $base-color;
}

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

&:after {
&::after {
background-color: $active-color;
}
}
Expand All @@ -47,7 +47,7 @@
border: 1px solid theming.daff-illuminate($base, $neutral, 5);
color: currentColor;

&:after {
&::after {
background: theming.daff-illuminate($base, $neutral, 2);
}

Expand All @@ -64,7 +64,7 @@
theming.daff-illuminate($base, $neutral, 3)
);

&:after {
&::after {
background: theming.daff-illuminate($base, $neutral, 3);
}
}
Expand Down Expand Up @@ -127,7 +127,7 @@
&:hover {
color: theming.daff-illuminate($base, $neutral, 5);

&:after {
&::after {
background-color: transparent;
opacity: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
@include base.daff-button-base();
@include base.daff-button-background(3px);
@include base.daff-button-sizes();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@
to {
transform: translateX(0);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$hover-color,
) {
.daff-card__wrapper {
&:after {
&::after {
background: $hover-color;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libs/design/card/src/card-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

&.daff-raised-card {
.daff-card__wrapper {
&:after {
&::after {
box-shadow: 0 16px 32px -4px rgba($black, 0.12),
0 8px 12px -2px rgba($black, 0.06);
}
Expand Down
18 changes: 11 additions & 7 deletions libs/design/card/src/card/card.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ a {
$root: &;
text-decoration: none;

.daff-card__image + .daff-card__wrapper {
&::after {
border-radius: 0 0 $card-border-radius $card-border-radius;
.daff-card__image {
+ .daff-card__wrapper {
&::after {
border-radius: 0 0 $card-border-radius $card-border-radius;
}
}
}

Expand All @@ -124,11 +126,13 @@ a {
z-index: 1;
}
}

&.daff-card--horizontal {
.daff-card__image + .daff-card__wrapper {
&::after {
border-radius: 0 $card-border-radius $card-border-radius 0;
.daff-card__image {
+ .daff-card__wrapper {
&::after {
border-radius: 0 $card-border-radius $card-border-radius 0;
}
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions libs/design/list/src/list-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@use '../../scss/core';
@use '../../scss/theming';

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

.daff-nav-list {
.daff-list-item {
&:after {
&::after {
background-color: $base;
}

&:hover,
&.active {
&:after {
&::after {
background-color: theming.daff-illuminate($base, $neutral, 2);
}
}
Expand Down
Loading

0 comments on commit eb5e20b

Please sign in to comment.