Make sure to test with more complex HTML tough (hint: color inheritance,...).
My basic idea for a component embeddable on 3rdparty websites was like #container *{ all: unset; } and then style everything from there... my conclusion was the same tough...
Awesome article. We in PostCSS are thinking about new methodology, when we automatically insert all:initial to all elements, to be sure, that components are isolated from inherited styles.
So we created all:initial polyfill in postcss-cssnext and postcss-autoreset to insert it by some rules.
Also with all: initial polyfill from cssnext we have consistently behavioral across browsers.
The main question is what you have with all: initial polyfill from cssnext?
@Christoph: Unfortunately,
all: unset
makes other alterations, but again, is inconsistent in its application across browsers. For example, Safari resetcolor
to black but neither Chrome nor Firefox did. Cursor also exhibited the same behaviour as described above.