css: Report some var() syntax errors
Detect cases such as var(), var(-), var("a") or var(21) early
and report them as syntax errors.
Test included.
Related: #6715
This commit is contained in:
15
testsuite/css/parser/variables-invalid-07.css
Normal file
15
testsuite/css/parser/variables-invalid-07.css
Normal file
@@ -0,0 +1,15 @@
|
||||
a {
|
||||
--accent-fg-color: var();
|
||||
}
|
||||
|
||||
b {
|
||||
--accent-fg-color: var(-);
|
||||
}
|
||||
|
||||
c {
|
||||
--accent-fg-color: var(a);
|
||||
}
|
||||
|
||||
d {
|
||||
--accent-fg-color: var(21);
|
||||
}
|
||||
4
testsuite/css/parser/variables-invalid-07.errors
Normal file
4
testsuite/css/parser/variables-invalid-07.errors
Normal file
@@ -0,0 +1,4 @@
|
||||
variables-invalid-07.css:2:26-27: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
variables-invalid-07.css:6:26-27: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
variables-invalid-07.css:10:26-27: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
variables-invalid-07.css:14:26-28: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
0
testsuite/css/parser/variables-invalid-07.ref.css
Normal file
0
testsuite/css/parser/variables-invalid-07.ref.css
Normal file
Reference in New Issue
Block a user