Re: [csswg-drafts] [cssom] Always return escaped idents? (#12258)

The CSS Working Group just discussed `[cssom] Always return escaped idents?`, and agreed to the following:

* `RESOLVED: all new OM attributes will use CSS parsing, see how much we can apply to other things`

<details><summary>The full IRC log of that discussion</summary>
&lt;kbabbitt> emilio: we feel pretty inconsistent about when cssom returns escaped or unescaped idents<br>
&lt;kbabbitt> ... tricky thing here is that if something is only an ident, it seems more convenient to return unescaped thing<br>
&lt;kbabbitt> ... but we 've had cases where something that used to be a simple syntax, or can be a mix of them, like font-face family getter and setter, can pass quoted things using css syntax or idents<br>
&lt;kbabbitt> ... in general I have a slight preference for always returning css syntax if we can get away with it<br>
&lt;kbabbitt> ... oriol had different thoughts, TabAtkins was arguing for a middle ground where we do unescaped thing if it's ?, css syntax for the rest<br>
&lt;kbabbitt> ... that's fine but we see cases where we expand to lists of things, that broke the css parser<br>
&lt;kbabbitt> ... mypreference is to always escape<br>
&lt;kbabbitt> TabAtkins: I am okay changing anything that takes literal string today to be a css processed string<br>
&lt;kbabbitt> ... so that it would be processed<br>
&lt;kbabbitt> ... and I think that's probably fine and safe<br>
&lt;kbabbitt> ... just want to make sure we don't do something incoherent like serialize a css escape for a property that doesn't understand it<br>
&lt;kbabbitt> ... so long as they roundtrip I'm happy<br>
&lt;kbabbitt> emilio: ok so we need a comprehensive list<br>
&lt;oriol> q+<br>
&lt;kbabbitt> ... I'm fine with taking that as a resolution and can take an action item for concrete changes<br>
&lt;kbabbitt> astearns: resolution would be...<br>
&lt;kbabbitt> emilio: do the css escape thing...<br>
&lt;astearns> ack oriol<br>
&lt;kbabbitt> astearns: do the new thing for new properties, see where we can apply to old props<br>
&lt;kbabbitt> oriol: in the issue I was arguing more for providing literal string instead of css syntax<br>
&lt;kbabbitt> ... in a few places we have expanded syntax to add some identifiersd<br>
&lt;kbabbitt> .... I guess I'm fine with this resolution of adding it for new things and then consider for old things one-by-one<br>
&lt;kbabbitt> ... would like to see a list of that but I'm fine<br>
&lt;kbabbitt> astearns: what is the exact resolution?<br>
&lt;emilio> Escape all new CSS ident like strings exposed in CSSOM, look at existing precedent and try to change to that<br>
&lt;kbabbitt> TabAtkins: pending a full review of all the OM attributes that take idents that need to be changed to use CSS processing, we plan to make all OM attributes use CSS parsing and thus also serialize with escapes when read<br>
&lt;kbabbitt> astearns: we are resolving that all new OM attributes will use CSS parsing<br>
&lt;kbabbitt> ... and we will see how much we can apply that to other things<br>
&lt;kbabbitt> TabAtkins: sounds fine<br>
&lt;kbabbitt> astearns: objections?<br>
&lt;kbabbitt> RESOLVED: all new OM attributes will use CSS parsing, see how much we can apply to other things<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12258#issuecomment-3357161476 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 1 October 2025 16:20:45 UTC