1

I had understaood (ref 1; ref 2) that CSS's all property, when set to revert, would, in the case of an author stylesheet, isolate it from inheriting from other author stylesheets.

In other words, elements protected with this property/value would be fed the styles in the current stylesheet and only the initial, default styles fed by the user agent.

According to MDN, when revert is used in an author stylesheet it

Rolls back the cascade to the user level, so that the specified values are calculated as if no author-level rules were specified for the element.

This doesn't seem to be the case for me, however. I have a Chrome extension which injects elements into a page, and I want to protect it from inheriting the webpage's styles.

CSS:

#guideo-tools, #guideo-tools * { all: revert; }

However, on the site shown in the pic it's inheriting box shadow on the buttons.

enter image description here

Have I misunderstood all?

Mitya
  • 33,629
  • 9
  • 60
  • 107

1 Answers1

2

You haven't misunderstood it, but the revert value for the all attribute is widely unsupported right now.

From the Mozilla Developer page on revert:

enter image description here

I can also see this if I look at their example fiddle in Chrome.

enter image description here

Liftoff
  • 24,717
  • 13
  • 66
  • 119
  • Interesting - I just figured that the latest Chrome supported pretty much everything :-P – Mitya Jul 23 '18 at 18:33