The original spec for constructable stylesheets allowed for calls to sheet.replace("@import('some.css');"). This use case is being removed - calls to replace() will throw an exception if @import rules are found in the replaced content. The CSS Working Group resolved to remove this feature on Feb 19, 2020: This feature was deprecated in M83, and will be removed in M84.


There is an asymmetry between replaceSync(), which disallows @import rules, and replace(), which currently allows them. Additionally, work is underway on CSS Modules, which appear to be coalescing on also disallowing @imports for a first version, and (possibly) on a next version where @imports behave as leaves in the module tree. This would also be an asymmetry with the current replace() API. For these reasons, the CSS Working Group resolved to disallow @import in calls to replace().



Specification link

Specification being incubated in a Community Group

Status in Chromium


Removed (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signals


Intent to Prototype url

Intent to Prototype thread

Search tags

CSSStyleSheet replace() @import,

Last updated on 2021-12-13