[csswg-drafts] [cssom] Add supportsText to StyleSheet and handle HTML <link media="supports()"> (#9361)

zcorpan has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom] Add supportsText to StyleSheet and handle HTML <link media="supports()"> ==
In https://github.com/whatwg/html/pull/7658 by @mirisuzanne the `media` attribute for `<link rel=stylesheet>` is changed to take an import condition (rather than a media query list), but I think that requires changes to CSSOM to work:

> For `<link rel=stylesheet media=...>` the `media` attribute is used in the CSSOM "create a CSS stylesheet" steps and a `MediaList` object gets created from the attribute's value, where that vaule is parsed as a media query list.
>
> Meanwhile, for `@import`, the `CSSImportRule` interface has a `supportsText` attribute for the `<supports-condition>` part.
>
> I think CSSOM needs to change to allow creating stylesheets with supports conditions, and changing the HTML `media` attribute needs to update both the `MediaList`'s `mediaText` and the `StyleSheet`'s `supportsText`. I'll file an issue for CSSOM.
>
> (Maybe also `CSSStyleSheetInit` (options for constructable stylesheets) should support `supports`, but that's not blocking this PR.)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9361 using your GitHub account


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

Received on Thursday, 14 September 2023 23:41:09 UTC