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

Give authors the ability to style form validation messages #7172

Open
bramus opened this issue Mar 24, 2022 · 5 comments
Open

Give authors the ability to style form validation messages #7172

bramus opened this issue Mar 24, 2022 · 5 comments

Comments

@bramus
Copy link
Contributor

bramus commented Mar 24, 2022

In this tweet, the author asks for this functionality.

Css really needs to be able to style this browsers popups with an error messages in inputs.

aria_rzer_2022-Mar-24

Seems like a reasonable request. I'm thinking of a pseudo-element ::validation-message.

@emilio
Copy link
Collaborator

emilio commented Mar 25, 2022

Part of the issue (at least on Firefox's side) is that these popups live in a different process from the page (so we hit the same issues that limit styling of <select> options).

That said, there may be an argument to be made about these messages escaping the page's viewport not being so critical, and I know we've discussed moving them to the page's process at least once. Maybe these days they could just be user agent top layer magic or so... cc @smaug----.

@smaug----
Copy link

smaug---- commented Apr 24, 2022

With <select> is was trivial to find examples where a small iframe is used to show just the select element. I would expect the same here. So if a cross origin iframe has a simple form and you need to show validation message, where should that message live?

@simevidas
Copy link
Contributor

Just being able to set font-size: inherit or font-size: 1rem would go a long way. Currently, it’s impossible to increase the text size of error messages (AFAIK).

@fantasai
Copy link
Collaborator

fantasai commented Jan 9, 2024

Some related CSSWG discussion: https://lists.w3.org/Archives/Public/www-style/2023Sep/0020.html

@svgeesus
Copy link
Contributor

Which current CSS spec, if any, does this fit under? I wasn't sure, else I would have labelled it.

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

No branches or pull requests

6 participants