mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
put attribute selector before pseudo-class selector - fixes #658
This commit is contained in:
parent
1ce6cfaa68
commit
b07f303780
@ -87,6 +87,11 @@ export default function processCss(
|
||||
shouldTransform = false;
|
||||
}
|
||||
|
||||
else if (child.type === 'PseudoElementSelector') {
|
||||
code.prependRight(c, attr);
|
||||
shouldTransform = false;
|
||||
}
|
||||
|
||||
c = child.end;
|
||||
});
|
||||
|
||||
|
3
test/css/samples/cascade-false-pseudo-element/_config.js
Normal file
3
test/css/samples/cascade-false-pseudo-element/_config.js
Normal file
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
cascade: false
|
||||
};
|
12
test/css/samples/cascade-false-pseudo-element/expected.css
Normal file
12
test/css/samples/cascade-false-pseudo-element/expected.css
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
span[svelte-583610229]::after {
|
||||
content: 'i am a pseudo-element';
|
||||
}
|
||||
|
||||
span[svelte-583610229]:first-child {
|
||||
color: red;
|
||||
}
|
||||
|
||||
span[svelte-583610229]:last-child::after {
|
||||
color: blue;
|
||||
}
|
15
test/css/samples/cascade-false-pseudo-element/input.html
Normal file
15
test/css/samples/cascade-false-pseudo-element/input.html
Normal file
@ -0,0 +1,15 @@
|
||||
<span></span>
|
||||
|
||||
<style>
|
||||
span::after {
|
||||
content: 'i am a pseudo-element';
|
||||
}
|
||||
|
||||
span:first-child {
|
||||
color: red;
|
||||
}
|
||||
|
||||
span:last-child::after {
|
||||
color: blue;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user