CSS Cascade and Inheritance spec defines the so called 'Override origin' for style sheets that links to DocumentCSS interface (from the DOM Level 2 spec from the year 2000). This seems to be the only mention of this interface on the W3C site (except of short conversation in the www-dom mailing list from 2008). The DOM Level 2 spec has the following text about it:
The expectation is that an instance of the
DocumentCSS
interface can be obtained by using binding-specific casting methods on an instance of theDocument
interface.
Is this mechanism implemented anywhere? Is it possible to play with these 'override styles' and to see the DocumentCSS
interface in action?
Sorta exists in WebKit (via KHTML) but not really, because the implementation just returns null.
And that just-return-null implementation ended up in Chrome too but was subsequently removed.
Also, as a comment above notes, a Firefox feature request has been open for it for 10+ years.
As far as Edge, there’s no indication it’s been implemented there yet either.
So it seems the answer is, it’s never actually been supported anywhere. Maybe somewhere in the CSS Houdini plans there’s something that will provide the same functionality?