You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ::before doesn't disable native appearance on Blink.
I think what happens is that Blink is using shadow DOM, so actual children of the element are not shown, but pseudo-elements are added after flattening the tree.
Firefox probably ignores the contents during layout instead of relying on shadow DOM.
Well, sorry about misguiding about what happens in this issue, I just thought that's the most reasonable way it could work.
I'm not a browser specialist, so if this issue should be renamed or some details should be changed please let me know.
I think we actually want to align on Gecko's behavior as much as possible. If you don't want to have native appearance, you need to explicitly opt out of it using appearance: none. And that in turn gives you access to pseudo elements and such. That's a much clearer story than certain properties sometimes influencing this.
So whether something allows ::before and ::after only depends on whether its box is replaced. Checkboxes are replaced so shouldn't get pseudo-elements just like <input type=text> or what not.
Spec should include pseudoelements (
::before
and::after
) as properties that disable native appearance.Current behaviour is not coherent:
appearance: none;
to be set to allow pseudoelements to exist.Sample code:
Result:
Left – Chromium 115.0.5790.110
Center – Epiphany 44.2
Right - Firefox 115.0.2
Expected result:
Firefox has pseudoelement with content
"Hello"
.Spec section:
https://drafts.csswg.org/css-ui-4/#appearance-disabling-properties
The text was updated successfully, but these errors were encountered: