-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Labels
css-nesting-1Current WorkCurrent Work
Description
During test writing, this came to mind:
<style>
.a {
color: red;
&.c { color: hotpink; }
}
</style>
<script>
document.styleSheets[0].rules[0].style = 'color: navy; &.b{color: green;}';
</script>What should happen?
- The change is silently ignored.
- “color: red” is changed to “color: navy” and no other changes take place.
- The same, but an additional rule “&.b { color: green; }” is added, above &.c.
- The same, but it's instead added after &.c.
- The same, but &.c is removed.
I'd say the sane thing to do is 2 since we parse a list of declarations (and already ignore @media etc. when setting .style), but this needs to be explicit in the spec, I think.
Metadata
Metadata
Assignees
Labels
css-nesting-1Current WorkCurrent Work