html - Are there any hacks to style based on input value with just CSS? -
for checkboxes it's possible style based on dynamic value like:
input[type="checkbox"] { ... } input[type="checkbox"]:checked { ... }
and can use :before
/ :after
make dynamic value affect other things on page.
so tried doing same text inputs, selects based on initial value attribute, not on dynamic value:
input[type="text"][value="x"] { ... }
and there's styling of options, applies display when selection dropdown open (and in chrome, not firefox):
option:selected { ... }
so there way style document based on text or select's dynamic value pure css?
i know there simple javascript solutions.
Comments
Post a Comment