Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid nested CSS #28

Closed
FDiskas opened this issue Nov 5, 2016 · 0 comments
Closed

Invalid nested CSS #28

FDiskas opened this issue Nov 5, 2016 · 0 comments
Labels
Milestone

Comments

@FDiskas
Copy link

FDiskas commented Nov 5, 2016

SCSS example:

$state: active;
$background: white;

.table-hover > tbody > tr {
  > td.#{$state}:hover,
  > th.#{$state}:hover,
  &.#{$state}:hover > td,
  &:hover > .#{$state},
  &.#{$state}:hover > th {
    background-color: darken($background, 5%);
  }
}

Compiles to INVALID:

> td.active:hover, > th.active:hover, .table-hover > tbody > tr.active:hover > td, .table-hover > tbody > tr:hover > .active, .table-hover > tbody > tr.active:hover > th {
  background-color: #f2f2f2;
}

Should be:

.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
  background-color: #f2f2f2;
}
@nex3 nex3 added the bug label Nov 7, 2016
@nex3 nex3 modified the milestone: 1.0.0 Nov 7, 2016
nex3 added a commit that referenced this issue Nov 8, 2016
If a child selector list contained one complex selector with & and one
without, the latter's parent wouldn't be added automatically.

Closes #28
@nex3 nex3 closed this as completed in #33 Nov 8, 2016
nex3 added a commit that referenced this issue Nov 8, 2016
If a child selector list contained one complex selector with & and one
without, the latter's parent wouldn't be added automatically.

Closes #28
nex3 added a commit to sass/sass-spec that referenced this issue Nov 8, 2016
nex3 pushed a commit that referenced this issue May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants