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

Fix .form-control in dark mode #37893

Merged
merged 2 commits into from
Jan 16, 2023
Merged

Fix .form-control in dark mode #37893

merged 2 commits into from
Jan 16, 2023

Conversation

mdo
Copy link
Member

@mdo mdo commented Jan 16, 2023

Removes the CSS variables for .form-control. The problem here is we're reassigning an earlier custom property --bs-body-bg with a new custom property --bs-form-control-bg, but the value of that original one stays computed to the first instance. Only two ways to combat this is to redeclare the variable for dark mode (adds file size), or to remove the extra custom variable. Chose to do the latter as this matches our other form controls.

Fixes #37891.

Before and after:

CleanShot 2023-01-16 at 15 36 51@2x

CleanShot 2023-01-16 at 15 35 06@2x

@mdo mdo requested a review from a team as a code owner January 16, 2023 23:41
@mdo mdo merged commit ca88999 into main Jan 16, 2023
@mdo mdo deleted the cm-form-control branch January 16, 2023 23:56
@mahilanmjd mahilanmjd mentioned this pull request Apr 16, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

In Bootstrap 5.3 alpha 1 input-group component partialy react to inline data-bs-theme="dark" attribute
1 participant