Skip to content

Commit

Permalink
Add color mode on file input
Browse files Browse the repository at this point in the history
  • Loading branch information
louismaximepiton committed Oct 10, 2023
1 parent 2401082 commit 7b02861
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ $form-range-thumb-transition: background-color $transition-duration

// scss-docs-start form-file-variables
$form-file-button-color: $input-color !default;
$form-file-button-bg: var(--#{$prefix}body-bg) !default;
$form-file-button-bg: $input-bg !default; // Boosted mod: instead of `var(--#{$prefix}tertiary-bg)`
$form-file-button-hover-bg: var(--#{$prefix}secondary-bg) !default;
// scss-docs-end form-file-variables

Expand Down
37 changes: 37 additions & 0 deletions site/content/docs/5.3/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -1885,3 +1885,40 @@ sitemap_exclude: true
<label for="excellent51" title="Excellent"><span class="visually-hidden">Excellent</span></label>
</fieldset></form>
</div>

### File input

<h4 class="mt-3">No theme</h4>

<div class="border border-tertiary p-3">
<input class="form-control" type="file">
<input class="form-control" type="file" disabled>
</div>

<h4 class="mt-3">Dark theme on container</h4>

<div class="border border-tertiary p-3 bg-body" data-bs-theme="dark">
<input class="form-control" type="file">
<input class="form-control" type="file" disabled>
</div>

<h4 class="mt-3">Light theme on container</h4>

<div class="border border-tertiary p-3 bg-body" data-bs-theme="light">
<input class="form-control" type="file">
<input class="form-control" type="file" disabled>
</div>

<h4 class="mt-3">Dark theme on component</h4>

<div class="border border-tertiary p-3" style="background-color: #282d55;">
<input class="form-control" type="file" data-bs-theme="dark">
<input class="form-control" type="file" data-bs-theme="dark" disabled>
</div>

<h4 class="mt-3">Light theme on component</h4>

<div class="border border-tertiary p-3" style="background-color: #b5e8f7">
<input class="form-control" type="file" data-bs-theme="light">
<input class="form-control" type="file" data-bs-theme="light" disabled>
</div>

0 comments on commit 7b02861

Please sign in to comment.