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

Display <select> and <option> using a dedicated stylesheet #1224

Closed
metapone opened this issue Oct 1, 2020 · 2 comments
Closed

Display <select> and <option> using a dedicated stylesheet #1224

metapone opened this issue Oct 1, 2020 · 2 comments
Labels
feature New feature that should be supported

Comments

@metapone
Copy link

metapone commented Oct 1, 2020

In the documentations I only see stylesheet for input (text, checkbox, radio) and textarea. Weird form type like input[type=range] would be hard to render in a quick-and-dirty way, I understand, but what about select?

I'm currently adding a option:checked next to input in my dedicated stylesheet, but the result doesn't look very good. All styles for select is lost because the actual element isn't rendered but only its selected option, but if I try to style select as well then select and option become separated as if they are different elements, with select being only a blank rectangular.

P.S. Is there a way to set a style to be used only for printing with WeasyPrint? Just in case if in the future I want to style the pages differently when they are printed versus when they are viewed online.

@grewn0uille
Copy link
Member

Hi!

P.S. Is there a way to set a style to be used only for printing with WeasyPrint? Just in case if in the future I want to style the pages differently when they are printed versus when they are viewed online.

You can use media queries to define css only for print @media print { your_css }

@liZe liZe added the feature New feature that should be supported label Oct 21, 2020
@liZe
Copy link
Member

liZe commented Aug 17, 2021

Let’s fix this problem in #1173 for all form inputs.

@liZe liZe closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature that should be supported
Projects
None yet
Development

No branches or pull requests

3 participants