Skip to content

Commit

Permalink
fix(clay-css): Use selector-unify to combine parent selectors with …
Browse files Browse the repository at this point in the history
…nested element selectors in mixins and components

fixes #2392
  • Loading branch information
pat270 authored and marcoscv-work committed Sep 10, 2019
1 parent afabdec commit cb8e0a2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/clay-css/src/scss/components/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
width: 100%;

@at-root {
ul#{&} {
#{selector-unify(&, ul)} {
@include list-unstyled;
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/clay-css/src/scss/mixins/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
width: $width;

@at-root {
a#{&},
button#{&} {
#{selector-unify(&, a)},
#{selector-unify(&, button)} {
cursor: $cursor;
}
}
Expand Down Expand Up @@ -318,8 +318,8 @@
word-wrap: $word-wrap;

@at-root {
a#{&},
button#{&} {
#{selector-unify(&, a)},
#{selector-unify(&, button)} {
cursor: $cursor;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/clay-css/src/scss/mixins/_close.scss
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
}

@at-root {
button#{&} {
#{selector-unify(&, button)} {
&:focus {
box-shadow: $btn-focus-box-shadow;
outline: $btn-focus-outline;
Expand Down
4 changes: 2 additions & 2 deletions packages/clay-css/src/scss/mixins/_labels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@
transition: $transition;

@at-root {
a#{&},
button#{&} {
#{selector-unify(&, a)},
#{selector-unify(&, button)} {
&:hover {
background-color: $hover-bg;
border-color: $hover-border-color;
Expand Down
2 changes: 1 addition & 1 deletion packages/clay-css/src/scss/mixins/_links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
}

@at-root {
button#{&} {
#{selector-unify(&, button)} {
&:focus {
box-shadow: $btn-focus-box-shadow;
outline: $btn-focus-outline;
Expand Down

0 comments on commit cb8e0a2

Please sign in to comment.