-
Notifications
You must be signed in to change notification settings - Fork 756
Description
In whatwg/html#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=...>themediaattribute is used in the CSSOM "create a CSS stylesheet" steps and aMediaListobject gets created from the attribute's value, where that vaule is parsed as a media query list.Meanwhile, for
@import, theCSSImportRuleinterface has asupportsTextattribute for the<supports-condition>part.I think CSSOM needs to change to allow creating stylesheets with supports conditions, and changing the HTML
mediaattribute needs to update both theMediaList'smediaTextand theStyleSheet'ssupportsText. I'll file an issue for CSSOM.(Maybe also
CSSStyleSheetInit(options for constructable stylesheets) should supportsupports, but that's not blocking this PR.)