Skip to content

Fix .form-control in dark mode#37893

Merged
mdo merged 2 commits intomainfrom
cm-form-control
Jan 16, 2023
Merged

Fix .form-control in dark mode#37893
mdo merged 2 commits intomainfrom
cm-form-control

Conversation

@mdo
Copy link
Copy Markdown
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