-
Notifications
You must be signed in to change notification settings - Fork 25
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
Toggle #69
base: dev
Are you sure you want to change the base?
Toggle #69
Conversation
Yes, we don't do any styling on non-nested labels anyway. Also, |
label[for]:has(+ [role=switch]), | ||
label[for] + [role=switch], | ||
[role=switch]:has(+ label[for]), | ||
[role=switch] + label[for] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label[for]:has(+ [role=switch]), | |
label[for] + [role=switch], | |
[role=switch]:has(+ label[for]), | |
[role=switch] + label[for] { | |
label[for]:has(+ &), | |
label[for] + &, | |
&:has(+ label[for]), | |
& + label[for] { |
I don't particularly like that my solution involves specifying label selectors in the aria.css file, where all the other parent selectors are just [role=thing]. It would be nice if I could move them inside the [role=switch] block somehow (or not include them).
I've tried before to style forms generically, it can't be done. The markup is just too powerful. I'm fine with forcing people to use table forms or layout utilities. |
I've made a mockup of what I'd like it to look like: https://codepen.io/deniz-a/pen/ExqLdbj |
Thanks! I'll try to get this dusted off in the coming days. |
Looks like this branch accidentally contained two fixes that needed to be implemented back during the addition of
[role=feed]
:token in tokens
/token of tokens
thing never got implemented in 19.js. Looks like vim also stripped extra whitespace form the file.The big feedback I'd appreciate right now is on the markup used. Please refer to the ARIA section of the documentation.
label + input
andinput + label
with e.g..f-row.justify-content:between
?<label class="f-row">
if usinglabel > input
? I don't particularly like that my solution involves specifyinglabel
selectors in thearia.css
file, where all the other parent selectors are just[role=thing]
. It would be nice if I could move them inside the[role=switch]
block somehow (or not include them).<label><input>Text</label>
is justified with space between, I would prefer it if the spacing is similar toinput + label
, but I don't think it's possible to distinguish between<label><input>Text</label>
and<label>Text<input></label>
, and the latter definitely needs the spacing imo.Also, I'd be grateful for any stylistic feedback, e.g. if the border is too thick, or if we want some other type of styling to make it look more consistent with the "missing look."
I know the
button
styling is broken right now, wanted to focus on getting the others right first. One question I had there was what the selector should be:button[role=switch][aria-pressed]
[role=switch][aria-pressed]
[aria-pressed]
I think (3) goes out the window because e.g. the collapsing navbar component uses
[aria-pressed]
(with.iconbutton
) and shouldn't be styled like a toggle.