{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/1843","repository_url":"https://api.github.com/repos/w3c/csswg-drafts","labels_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/1843/labels{/name}","comments_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/1843/comments","events_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/1843/events","html_url":"https://github.com/w3c/csswg-drafts/issues/1843","id":262008560,"number":1843,"title":"[cssom] shorthand not representing the values of list in its grammar?","user":{"login":"waldbaerkoch","id":3583116,"avatar_url":"https://avatars0.githubusercontent.com/u/3583116?v=4","gravatar_id":"","url":"https://api.github.com/users/waldbaerkoch","html_url":"https://github.com/waldbaerkoch","followers_url":"https://api.github.com/users/waldbaerkoch/followers","following_url":"https://api.github.com/users/waldbaerkoch/following{/other_user}","gists_url":"https://api.github.com/users/waldbaerkoch/gists{/gist_id}","starred_url":"https://api.github.com/users/waldbaerkoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldbaerkoch/subscriptions","organizations_url":"https://api.github.com/users/waldbaerkoch/orgs","repos_url":"https://api.github.com/users/waldbaerkoch/repos","events_url":"https://api.github.com/users/waldbaerkoch/events{/privacy}","received_events_url":"https://api.github.com/users/waldbaerkoch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-02T08:06:17Z","updated_at":"2017-10-05T00:30:27Z","closed_at":"2017-10-05T00:30:27Z","author_association":"NONE","body":"6.7.2. [Serializing CSS Values](https://drafts.csswg.org/cssom/#serializing-css-values)\r\nStep 1.2:\r\n> If shorthand cannot represent the values of list in its grammar, return the empty string and terminate these steps.\r\n\r\nThis step is invoked if the procedure is called with a list of longhand declarations:\r\n* step [3.2.5](https://drafts.csswg.org/cssom/#ref-for-serialize-a-css-value) of ['serialize a CSS declaration block'](https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block)\r\n* step [1.2.3](https://drafts.csswg.org/cssom/#ref-for-serialize-a-css-value%E2%91%A1) of [`getPropertyValue(property)`](https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue)\r\n\r\nIn 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:\r\n* setting `cssText`: in step 3 calls ['parse a CSS declaration block'](https://drafts.csswg.org/cssom/#parse-a-css-declaration-block) which parses \"_declaration_ according to the appropriate CSS specifications, dropping parts that are said to be ignored\".\r\n* `setProperty(property, value, priority)`: in step 5 calls ['parse a CSS value'](https://drafts.csswg.org/cssom/#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.\r\n* `setPropertyValue(property, value)`: in step 4 calls ['parse a CSS value'](https://drafts.csswg.org/cssom/#parse-a-css-value), and then in step 5 terminates if the parsing returns null."},"comment":{"url":"https://api.github.com/repos/w3c/csswg-drafts/issues/comments/334326792","html_url":"https://github.com/w3c/csswg-drafts/issues/1843#issuecomment-334326792","issue_url":"https://api.github.com/repos/w3c/csswg-drafts/issues/1843","id":334326792,"user":{"login":"tabatkins","id":682840,"avatar_url":"https://avatars0.githubusercontent.com/u/682840?v=4","gravatar_id":"","url":"https://api.github.com/users/tabatkins","html_url":"https://github.com/tabatkins","followers_url":"https://api.github.com/users/tabatkins/followers","following_url":"https://api.github.com/users/tabatkins/following{/other_user}","gists_url":"https://api.github.com/users/tabatkins/gists{/gist_id}","starred_url":"https://api.github.com/users/tabatkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tabatkins/subscriptions","organizations_url":"https://api.github.com/users/tabatkins/orgs","repos_url":"https://api.github.com/users/tabatkins/repos","events_url":"https://api.github.com/users/tabatkins/events{/privacy}","received_events_url":"https://api.github.com/users/tabatkins/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T00:30:27Z","updated_at":"2017-10-05T00:30:27Z","author_association":"MEMBER","body":"Yeah, there are a number of situations where you can set up the longhands in such a way that they can't be represented by the shorthand.  Nothing invalid here, just things getting more complex than the shorthand can handle, like @Loirooriol illustrated."}}
{"actor":{"display_login":"tabatkins"}}