-
Notifications
You must be signed in to change notification settings - Fork 418
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
Documentation issue with checkboxes? #609
Comments
I ran into the same confusion with Here's an example where the JSX is written that gets rendered into the sample element in the docs. Probably it's just an oversight that the HTML examples contain JSX. As for the horizontal versus vertical stacking, I found that a bit of a head scratcher too. It's indeed the nesting relationship between the label and the input that makes the difference. The default style for labels is One thing I found interesting here is that the |
In CSS, it's not possible to select a previous sibling (or a parent element, for that matter) so it's necessary for the |
Thanks for the clarification @dev-willis. So selecting a |
Well, no, it's not that it would require a separate rule: it's literally impossible to select a preceding element with CSS alone. For this reason, creating custom styles for |
I see what you mean now. The fact of not being able to select a previous sibling is equivalent to not being able to select an element based on the fact that it has some following sibling. However, it seems that this restriction has been lifted with Adding this rule on top of Pico did what I was looking for:
|
Ah, very nice! Technically, it isn't actually selecting a previous sibling (it's looking ahead of the currently selected element) but it accomplishes the same thing. A good solution! |
Please search for duplicate or closed issues first.
Describe the issue
Looking at the documentation for checkboxes (https://picocss.com/docs/forms/checkboxes), I have two things that confuse me about the "Horizontal Stacking" section.
htmlFor
attribute rather than thefor
attribute? Maybe my search-fu isn't working today, but everything I can find abouthtmlFor
indicates that you would use this in Javascript, but not in direct HTML.input
inside thelabel
?), could you be more explicit what it is?Current Behavior
The documentation is confusing.
Expected Behavior
I expected the documentation to be less confusing.
The text was updated successfully, but these errors were encountered: