|
|
|
|
@ -434,76 +434,76 @@ export function css_expected_identifier(node) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A :global {...} block cannot follow a %name% combinator
|
|
|
|
|
* A `:global` selector cannot follow a `%name%` combinator
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @param {string} name
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_block_invalid_combinator(node, name) {
|
|
|
|
|
e(node, "css_global_block_invalid_combinator", `A :global {...} block cannot follow a ${name} combinator`);
|
|
|
|
|
e(node, "css_global_block_invalid_combinator", `A \`:global\` selector cannot follow a \`${name}\` combinator`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A :global {...} block can only contain rules, not declarations
|
|
|
|
|
* A `:global {...}` block can only contain rules, not declarations
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_block_invalid_declaration(node) {
|
|
|
|
|
e(node, "css_global_block_invalid_declaration", "A :global {...} block can only contain rules, not declarations");
|
|
|
|
|
e(node, "css_global_block_invalid_declaration", "A `:global {...}` block can only contain rules, not declarations");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A :global {...} block cannot be part of a selector list with more than one item
|
|
|
|
|
* A `:global` selector cannot be part of a selector list with more than one item
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_block_invalid_list(node) {
|
|
|
|
|
e(node, "css_global_block_invalid_list", "A :global {...} block cannot be part of a selector list with more than one item");
|
|
|
|
|
e(node, "css_global_block_invalid_list", "A `:global` selector cannot be part of a selector list with more than one item");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A :global {...} block cannot modify an existing selector
|
|
|
|
|
* A `:global` selector cannot modify an existing selector
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_block_invalid_modifier(node) {
|
|
|
|
|
e(node, "css_global_block_invalid_modifier", "A :global {...} block cannot modify an existing selector");
|
|
|
|
|
e(node, "css_global_block_invalid_modifier", "A `:global` selector cannot modify an existing selector");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A :global {...} block at the very beginning cannot be modified by other selectors
|
|
|
|
|
* A `:global` selector at the very beginning cannot be modified by other selectors
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_block_invalid_modifier_start(node) {
|
|
|
|
|
e(node, "css_global_block_invalid_modifier_start", "A :global {...} block at the very beginning cannot be modified by other selectors");
|
|
|
|
|
e(node, "css_global_block_invalid_modifier_start", "A `:global` selector at the very beginning cannot be modified by other selectors");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* :global(...) can be at the start or end of a selector sequence, but not in the middle
|
|
|
|
|
* `:global(...)` can be at the start or end of a selector sequence, but not in the middle
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_invalid_placement(node) {
|
|
|
|
|
e(node, "css_global_invalid_placement", ":global(...) can be at the start or end of a selector sequence, but not in the middle");
|
|
|
|
|
e(node, "css_global_invalid_placement", "`:global(...)` can be at the start or end of a selector sequence, but not in the middle");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* :global(...) must contain exactly one selector
|
|
|
|
|
* `:global(...)` must contain exactly one selector
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_invalid_selector(node) {
|
|
|
|
|
e(node, "css_global_invalid_selector", ":global(...) must contain exactly one selector");
|
|
|
|
|
e(node, "css_global_invalid_selector", "`:global(...)` must contain exactly one selector");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* :global(...) must not contain type or universal selectors when used in a compound selector
|
|
|
|
|
* `:global(...)` must not contain type or universal selectors when used in a compound selector
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_global_invalid_selector_list(node) {
|
|
|
|
|
e(node, "css_global_invalid_selector_list", ":global(...) must not contain type or universal selectors when used in a compound selector");
|
|
|
|
|
e(node, "css_global_invalid_selector_list", "`:global(...)` must not contain type or universal selectors when used in a compound selector");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -525,12 +525,12 @@ export function css_selector_invalid(node) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* :global(...) must not be followed with a type selector
|
|
|
|
|
* `:global(...)` must not be followed with a type selector
|
|
|
|
|
* @param {null | number | NodeLike} node
|
|
|
|
|
* @returns {never}
|
|
|
|
|
*/
|
|
|
|
|
export function css_type_selector_invalid_placement(node) {
|
|
|
|
|
e(node, "css_type_selector_invalid_placement", ":global(...) must not be followed with a type selector");
|
|
|
|
|
e(node, "css_type_selector_invalid_placement", "`:global(...)` must not be followed with a type selector");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|