relax check to include whitespace (results in different output); wording

pull/6322/head
Simon H 4 years ago committed by GitHub
parent ad5d19bcfc
commit ba488ffa33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -236,7 +236,7 @@ export default {
}, },
css_invalid_global_selector_position: { css_invalid_global_selector_position: {
code: 'css-invalid-global-selector-position', code: 'css-invalid-global-selector-position',
message: ':global(...) which not at the start of selector sequence should not contain type or universal selector' message: ':global(...) not at the start of a selector sequence should not contain type or universal selectors'
}, },
css_invalid_selector: (selector: string) => ({ css_invalid_selector: (selector: string) => ({
code: 'css-invalid-selector', code: 'css-invalid-selector',

@ -189,7 +189,7 @@ export default class Selector {
index !== 0 && index !== 0 &&
selector.children && selector.children &&
selector.children.length > 0 && selector.children.length > 0 &&
!/[.:#]/.test(selector.children[0].value) !/[.:#\s]/.test(selector.children[0].value)
) { ) {
component.error(selector, compiler_errors.css_invalid_global_selector_position); component.error(selector, compiler_errors.css_invalid_global_selector_position);
} }

@ -1,6 +1,6 @@
[{ [{
"code": "css-invalid-global-selector-position", "code": "css-invalid-global-selector-position",
"message": ":global(...) which not at the start of selector sequence should not contain type or universal selector", "message": ":global(...) not at the start of a selector sequence should not contain type or universal selectors",
"start": { "start": {
"line": 2, "line": 2,
"column": 5 "column": 5

@ -2,5 +2,4 @@
.foo:global(div) { .foo:global(div) {
color: red; color: red;
} }
</style>
</style>

Loading…
Cancel
Save