Skip to content

Commit

Permalink
Fix .form-control in dark mode (#37893)
Browse files Browse the repository at this point in the history
* Fix .form-control in dark mode

* Remove CSS vars from docs
  • Loading branch information
mdo authored Jan 16, 2023
1 parent b3febfb commit ca88999
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
5 changes: 0 additions & 5 deletions scss/_root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@
--#{$prefix}box-shadow-lg: #{$box-shadow-lg};
--#{$prefix}box-shadow-inset: #{$box-shadow-inset};

// scss-docs-start form-control-vars
--#{$prefix}form-control-bg: var(--#{$prefix}body-bg);
--#{$prefix}form-control-disabled-bg: var(--#{$prefix}secondary-bg);
// scss-docs-end form-control-vars

// Focus styles
// scss-docs-start root-focus-variables
--#{$prefix}focus-ring-width: #{$focus-ring-width};
Expand Down
4 changes: 2 additions & 2 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,9 @@ $input-padding-y-lg: $input-btn-padding-y-lg !default;
$input-padding-x-lg: $input-btn-padding-x-lg !default;
$input-font-size-lg: $input-btn-font-size-lg !default;

$input-bg: var(--#{$prefix}form-control-bg) !default;
$input-bg: var(--#{$prefix}body-bg) !default;
$input-disabled-color: null !default;
$input-disabled-bg: var(--#{$prefix}form-control-disabled-bg) !default;
$input-disabled-bg: var(--#{$prefix}secondary-bg) !default;
$input-disabled-border-color: null !default;

$input-color: var(--#{$prefix}body-color) !default;
Expand Down
6 changes: 0 additions & 6 deletions site/content/docs/5.3/forms/form-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ Learn more about [support for datalist elements](https://caniuse.com/datalist).

## CSS

### Variables

Form controls make use of a small amount of CSS variables to support custom styling across color modes.

{{< scss-docs name="form-control-vars" file="scss/_root.scss" >}}

### Sass variables

`$input-*` are shared across most of our form controls (and not buttons).
Expand Down

0 comments on commit ca88999

Please sign in to comment.