mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
PropertyDeclaration with CSSWideKeyword is parsed
Addresses #15401 The desired result is for `CSSWideKeyword`s to return false (they are parsed) and other Custom declaration values to return true (they are unparsed).
This commit is contained in:
parent
0a3b373a6a
commit
ec87545774
2 changed files with 24 additions and 1 deletions
|
@ -1124,4 +1124,25 @@ mod shorthand_serialization {
|
|||
assert_eq!(serialization, block_text);
|
||||
}
|
||||
}
|
||||
|
||||
mod keywords {
|
||||
pub use super::*;
|
||||
#[test]
|
||||
fn css_wide_keywords_should_be_parsed() {
|
||||
let block_text = "--a:inherit;";
|
||||
let block = parse_declaration_block(block_text);
|
||||
|
||||
let serialization = block.to_css_string();
|
||||
assert_eq!(serialization, "--a: inherit;");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn non_keyword_custom_property_should_be_unparsed() {
|
||||
let block_text = "--main-color: #06c;";
|
||||
let block = parse_declaration_block(block_text);
|
||||
|
||||
let serialization = block.to_css_string();
|
||||
assert_eq!(serialization, block_text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue