mirror of https://github.com/sveltejs/svelte
fix: emit error on wrong placement of the `:global` block selector (#15794)
Co-authored-by: 7nik <kifiranet@gmail.com>pull/15800/head
parent
6fe5977b3d
commit
d8c6afde94
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: emit error on wrong placement of the `:global` block selector
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'css_global_block_invalid_placement',
|
||||
message: 'A `:global` selector cannot be inside a pseudoclass',
|
||||
position: [28, 35]
|
||||
}
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
<style>
|
||||
/* invalid */
|
||||
:is(:global) { color: red }
|
||||
</style>
|
Loading…
Reference in new issue