RFC: CSS label vs input
-
Hi David,
First off, I love your plugin. Nice, crisp and easy to use.
However, I’m trying to change some things using CSS and get stuck on the fact that the labels come before the corresponding inputs in
pt-field-group
s.
Disadvantage of this being we cannot use constructions likeinput:focus + label::before
in CSS.
This is because CSS does not have the ability to traverse backwards (i.e. select previous siblings) or up the parent node (i.e. select the wrapping elements).An example of the styling I am trying to achieve is seen here: https://codepen.io/ilwcss/pen/tAgqH
Now of course with JS everything can be done. But I think it would make sense to have the label and input reversed.
Or maybe you have solved similar challenges far simpler than what I’m trying to do?Id like to hear what you think of my suggestion!
Best regards,
Rob
- The topic ‘RFC: CSS label vs input’ is closed to new replies.