-
Notifications
You must be signed in to change notification settings - Fork 757
Closed
Labels
Description
6.7.2. Serializing CSS Values
Step 1.2:
If shorthand cannot represent the values of list in its grammar, return the empty string and terminate these steps.
This step is invoked if the procedure is called with a list of longhand declarations:
- step 3.2.5 of 'serialize a CSS declaration block'
- step 1.2.3 of
getPropertyValue(property)
In which situation can the shorthand not represent the values of list in its grammar? That sounds like a declaration passed to this procedure can have an invalid value. As I read the procedures for manipulating a CSSStyleDeclaration the values are always checked against spec:
- setting
cssText: in step 3 calls 'parse a CSS declaration block' which parses "declaration according to the appropriate CSS specifications, dropping parts that are said to be ignored". setProperty(property, value, priority): in step 5 calls 'parse a CSS value', which matches "list against the grammar for the property property in the CSS specification", and then in step 6 terminates if the parsing returns null.setPropertyValue(property, value): in step 4 calls 'parse a CSS value', and then in step 5 terminates if the parsing returns null.