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

Required form label for horizontal forms #1161

Merged
merged 2 commits into from Jul 30, 2022

Conversation

kevinpapst
Copy link
Collaborator

@kevinpapst kevinpapst commented Jul 2, 2022

According to the Bootstrap docs labels do get col-form-label in horizontal forms and not form-label as in classical form layout. See examples at https://getbootstrap.com/docs/5.2/forms/layout/#horizontal-form . Some frameworks that render forms (e.g. PHP Symfony) do stick to the original definition and I was missing the * in some forms.

Tabler until now does only style form-label, there is no mention of col-form-label.
This was okay in most cases, but the required class isn't applied (compare before and after screenshots).

I adjusted the demo, so there is a showcase of the required class as well in horizontal forms. I also adjusted the used label class, so the demo HTML matches the HTML from the Bootstrap docs.

Before:
Bildschirmfoto 2022-07-02 um 23 50 17

After:
Bildschirmfoto 2022-07-02 um 23 50 41

The screenshots were taken after adjusting the HTML (see required * on the left) but before adjusting the CSS.

@vercel
Copy link

vercel bot commented Jul 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
tabler ✅ Ready (Inspect) Visit Preview Jul 2, 2022 at 10:06PM (UTC)

@rjd22
Copy link
Collaborator

rjd22 commented Jul 30, 2022

Thank your for fixing this!

@rjd22 rjd22 merged commit dc8cad1 into tabler:main Jul 30, 2022
@kevinpapst kevinpapst deleted the form-label-horizontal branch July 30, 2022 10:51
@kevinpapst
Copy link
Collaborator Author

Thanks for review and merge 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants