Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need spec for layout of ::before/::after pseudos on form controls #4086

Open
MatsPalmgren opened this issue Oct 11, 2018 · 5 comments
Open

Comments

@MatsPalmgren
Copy link

http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=6281

It seems Firefox and Chrome are incompatible in a number of cases.

@MatsPalmgren
Copy link
Author

Here's another testcase with ::before/::after on <option> and <optgroup> in various contexts. UAs are even more incompatible for these elements.
(I filed a bug to make Gecko more compatible with Chrome/Edge for those cases.)

@SelenIT
Copy link

SelenIT commented Oct 29, 2018

Interestingly, Firefox starts to apply these pseudos to checkbox/radio input types after setting them -moz-appearance:none and any explicit valid display value, but doesn't do so for "text-like" input types.

@dbaron
Copy link
Member

dbaron commented Mar 29, 2019

Per the CSS spec, I think these generally shouldn't work on form controls (since they're replaced elements), unless you can actually fully explain a form control using the CSS model. So in the cases where they do work, I think the spec needs to specify how.

@zcorpan
Copy link
Member

zcorpan commented Mar 30, 2019

I think it's still unclear to what extent form controls are replaced elements. e.g. per #4143 a button acts as a replaced element in some aspects but not in others. Buttons aren't fully explainable with just the CSS model, yet ::before/::after work.

Form controls are weird. 🙂

@SelenIT
Copy link

SelenIT commented Mar 30, 2019

on form controls (since they're replaced elements)

But the HTML spec clearly lists them under Non-replaced elements. Don't we need a common definition of what makes the element replaced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants