mirror of https://github.com/sveltejs/svelte
parent
757c4541f4
commit
94534c0262
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-css-global-block-combinator',
|
||||
message: 'A :global {...} block cannot follow a > combinator',
|
||||
position: [12, 21]
|
||||
}
|
||||
});
|
||||
@ -1,3 +1,3 @@
|
||||
<style>
|
||||
:global {}
|
||||
.x > :global {}
|
||||
</style>
|
||||
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-css-global-block-declaration',
|
||||
message: 'A :global {...} block can only contain rules, not declarations',
|
||||
position: [24, 34]
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,5 @@
|
||||
<style>
|
||||
.x :global {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-css-global-block-modifier',
|
||||
message: 'A :global {...} block cannot modify an existing selector',
|
||||
position: [14, 21]
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,3 @@
|
||||
<style>
|
||||
.x .y:global {}
|
||||
</style>
|
||||
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-css-global-block-list',
|
||||
message: 'A :global {...} block cannot be part of a selector list with more than one item',
|
||||
position: [9, 31]
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,3 @@
|
||||
<style>
|
||||
.x :global, .y :global {}
|
||||
</style>
|
||||
@ -1,9 +0,0 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-css-global-selector',
|
||||
message: ':global(...) must contain exactly one selector',
|
||||
position: [16, 16]
|
||||
}
|
||||
});
|
||||
Loading…
Reference in new issue