Re: [csswg-drafts] [cssom] CSSImportRule.media should be nullable, maybe? Difference between Chromium and Firefox (#12063)

The CSS Working Group just discussed `[cssom] CSSImportRule.media should be nullable, maybe? Difference between Chromium and Firefox`, and agreed to the following:

* `RESOLVED: keep media on the @import rule object and see if it's web compat`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> emilio: the main thing here for @import and media is that it's a stylesheet and the main issue what happen if you don't load it<br>
&lt;ydaniv> ... one engine returns null, and another doesn't<br>
&lt;ydaniv> ... when you have @supports with media, should that be reflected in the interface?<br>
&lt;ydaniv> ... if we say no, then the answer for what the OM for @supports should do is pretty easy, provide whatever the rule has<br>
&lt;ydaniv> ... but what happen when there's no stylesheet<br>
&lt;ydaniv> ... and then file an issue in Blink for skipping rules entirely<br>
&lt;ydaniv> astearns: other opinions?<br>
&lt;emilio> should importRule.media == importRule.sheet.media<br>
&lt;ydaniv> astearns: what would be prefered resoluiton here?<br>
&lt;TabAtkins> Agree with emilio<br>
&lt;ydaniv> emilio: prefer if the media would be a part of the object<br>
&lt;ydaniv> ... but also it's incossistent with [missed]<br>
&lt;ydaniv> s/[missed]/it would make import incossitent with link<br>
&lt;emilio> &lt;link media="foo"> -> StyleSheet.media mirrors `foo`<br>
&lt;ydaniv> dbaron: I guess media on the stylesheet is weird, it's not a charachter of the stylesheet, but of who imports it<br>
&lt;TabAtkins> +1 to dbaron, it's an odd legacy thing<br>
&lt;ydaniv> emilio: I think this is kinda what I proposed<br>
&lt;ydaniv> dbaron: do we want to keep it as is? or change what it does with new things?<br>
&lt;ydaniv> emilio: right now the media object in Gecko we deep clone them<br>
&lt;ydaniv> ... you could get stuff out of sync<br>
&lt;ydaniv> ... a bit edge case<br>
&lt;ydaniv> dbaron: for what it does it should be the same object or it gets out of sync, but do we want that behavior of not?<br>
&lt;ydaniv> emilio: there are compat implications, would like to try and see what ppl depend on<br>
&lt;ydaniv> PROPOSED RESOLUTION: keep media on the @import rule object and see if it's web compat<br>
&lt;dbaron> StyleSheet has ownerNode and CSSStyleSheet has ownerRule...<br>
&lt;ydaniv> emilio: the media on the stylesheet would return all and unconditionally imported would be a weird thing<br>
&lt;ydaniv> astearns: is it possible for stylesheet to have multiple ownerRules?<br>
&lt;ydaniv> ... emilio is proposed resolution good?<br>
&lt;ydaniv> emilio: I guess ok, specify they're the same object, so styleheet.meda and stylesheet.owner.media<br>
&lt;ydaniv> astearns: objections to proposed resolution?<br>
&lt;ydaniv> RESOLVED: keep media on the @import rule object and see if it's web compat<br>
</details>


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


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

Received on Wednesday, 11 February 2026 16:37:22 UTC