Skip to content

Commit

Permalink
fix(radio, toggle): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
keryanS committed Mar 9, 2023
1 parent ea2bb9a commit b91bcb8
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/component/radio/deprecated/style/_module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
#{ns-group(radio)}:not(#{ns(radio-rich)}) {
input[type="radio"] {
+ label {
background-position: calc(-#{space(1v)} + 1px) calc(#{space(2v)} + 1px), calc(-#{space(1v)} + 1px) calc(#{space(2v)} + 1px);
background-position: calc(#{space(-1v)} + 1px) calc(#{space(2v)} + 1px), calc(#{space(-1v)} + 1px) calc(#{space(2v)} + 1px);
}
}
}

#{ns-group(radio)}--sm:not(#{ns(radio-rich)}) {
input[type="radio"] {
+ label {
background-position: calc(-#{space(0.5v)} + 1px) calc(#{space(4v)} - 1px), calc(-#{space(0.5v)} + 1px) calc(#{space(4v)} - 1px);
background-position: calc(#{space(-0.5v)} + 1px) calc(#{space(4v)} - 1px), calc(#{space(-0.5v)} + 1px) calc(#{space(4v)} - 1px);
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/component/radio/style/_tool.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,5 @@
}

@function radio-rich-background-image($checked: true) {
@return 'linear-gradient(0deg, $color#3, $color#3), linear-gradient(0deg, $color#3, $color#3), linear-gradient(0deg, $color#3, $color#3), linear-gradient(0deg, $color#3, $color#3), #{radio-background-image($checked, sm)}';
@return 'linear-gradient(0deg, $color#3, $color#3), linear-gradient(0deg, $color#3, $color#3), linear-gradient(0deg, $color#3, $color#3), linear-gradient(0deg, $color#3, $color#3), #{radio-background-image($checked, sm)}';
}



2 changes: 1 addition & 1 deletion src/component/radio/style/module/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
-webkit-tap-highlight-color: transparent;
@include display-flex(row, center, flex-start, wrap);
@include padding-left(8v);
background-position: calc(-#{space(1v)} + 1px) calc(-#{space(1v)} + 1px), calc(-#{space(1v)} + 1px) calc(-#{space(1v)} + 1px);
background-position: calc(#{space(-1v)} + 1px) calc(#{space(-1v)} + 1px), calc(#{space(-1v)} + 1px) calc(#{space(-1v)} + 1px);
background-size: #{space(7.5v)} #{space(7.5v)}, #{space(7.5v)} #{space(7.5v)};
background-repeat: no-repeat, no-repeat;

Expand Down
2 changes: 1 addition & 1 deletion src/component/radio/style/module/_sm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

& + label {
@include padding-left(6v);
background-position: calc(-#{space(0.5v)} + 1px) calc(#{space(1v)} - 1px), calc(-#{space(0.5v)} + 1px) calc(#{space(1v)} - 1px);
background-position: calc(#{space(-0.5v)} + 1px) calc(#{space(1v)} - 1px), calc(#{space(-0.5v)} + 1px) calc(#{space(1v)} - 1px);
background-size: #{space(4.5v)} #{space(4.5v)}, #{space(4.5v)} #{space(4.5v)};

@include before {
Expand Down
1 change: 1 addition & 0 deletions src/component/radio/style/scheme/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
& + label {
@include color.background-image((disabled grey), (legacy:$legacy), radio-background-image(false));
}

&:checked + label {
@include color.background-image((disabled grey) (disabled grey), (legacy:$legacy), radio-background-image(true));
}
Expand Down
1 change: 1 addition & 0 deletions src/component/radio/style/scheme/_rich.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@use 'module/color';
@use 'module/disabled';
@use 'module/selector';

@mixin _radio-scheme-rich($legacy: false) {
#{ns(radio-rich)} {
Expand Down
1 change: 1 addition & 0 deletions src/component/radio/style/scheme/_sm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
& + label {
@include color.background-image((disabled grey), (legacy:$legacy), radio-background-image(false, sm));
}

&:checked + label {
@include color.background-image((disabled grey) (disabled grey), (legacy:$legacy), radio-background-image(true, sm));
}
Expand Down
3 changes: 1 addition & 2 deletions src/component/toggle/style/_scheme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

input[type="checkbox"] {
&:checked {
~ #{ns(toggle__label)} {
~ #{ns(toggle__label)} {
@include before {
@include color.data-uri-svg((border plain error) (action-high blue-france), (legacy: $legacy), $toggle-checked-svg);
}
Expand Down Expand Up @@ -126,5 +126,4 @@
}
}
}

}
2 changes: 1 addition & 1 deletion src/component/toggle/style/module/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
&#{ns-attr(unchecked-label)}#{ns-attr(checked-label)} {
@include padding-left(0);

@include before(attr(#{ns-attr(unchecked-label, null, true)})){
@include before(attr(#{ns-attr(unchecked-label, null, true)})) {
@include margin-right(calc(var(--toggle-status-width) - #{spacing.space(2v)}));
};

Expand Down

0 comments on commit b91bcb8

Please sign in to comment.