← Back to release summary

CSSImportRule.styleSheet

Category
CSS
Type
Chromium catches up
Status
Enabled by default (Chrome 159)
Intent stage
None

WPT details: https://wpt.fyi/results/css/cssom/cssimportrule.html?label=experimental&label=master&aligned

Summary

Returns null from CSSImportRule.styleSheet when an @import rule has no associated stylesheet, including when its supports() condition is false. This lets developers check whether a stylesheet is associated with the rule before accessing its properties.

Motivation

CSS Cascade requires CSSImportRule.styleSheet to return null when an @import supports() condition does not match, and CSSOM declares the attribute nullable. This change aligns Chromium with those requirements.

Standards & signals

Ecosystem

View on chromestatus.com