mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Avoid trying to serialize 'all' with stuff that isn't variable references or CSS wide keywords
All is special, and that'd cause an error later on. Differential Revision: https://phabricator.services.mozilla.com/D115132
This commit is contained in:
parent
dd28d22cee
commit
4bcf4573db
1 changed files with 5 additions and 0 deletions
|
@ -1537,6 +1537,11 @@ impl ShorthandId {
|
|||
return None;
|
||||
}
|
||||
|
||||
if self == ShorthandId::All {
|
||||
// 'all' only supports variables and CSS wide keywords.
|
||||
return None;
|
||||
}
|
||||
|
||||
// Check whether all declarations can be serialized as part of shorthand.
|
||||
if declarations3.all(|d| d.may_serialize_as_part_of_shorthand()) {
|
||||
return Some(AppendableValue::DeclarationsForShorthand(self, declarations));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue