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

Mark radio and checkbox container elements as checked to allow label styling #229

Merged
merged 2 commits into from
Jul 29, 2023

Conversation

jkeen
Copy link
Contributor

@jkeen jkeen commented May 7, 2023

Currently with the <input> element inside a wrapper element, you can't style the form labels differently based on the checked state of the input (which I'd normally do with a input:checked + label selector)

This PR adds a --checked variant class to the top-level form elements of both the radio buttons and checkboxes when they're checked so that the child elements can be targeted and styled

@jkeen jkeen changed the title Mark radio and checkbox input container elements as checked to sibling label styling Mark radio and checkbox container elements as checked to allow label styling May 8, 2023
@jkeen
Copy link
Contributor Author

jkeen commented May 17, 2023

@josemarluedke Josemar! I've slowly been migrating my some old custom components to using frontile, and even without being a tailwind guy this component set is saving me so much time and headache. Thanks for all your work on this beautiful library

@josemarluedke josemarluedke added the Type: Enhancement New feature or request label Jul 28, 2023
@josemarluedke
Copy link
Owner

The changes look good. Thanks for working on them.

@josemarluedke josemarluedke merged commit 6c7656b into josemarluedke:main Jul 29, 2023
6 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants