Skip to content

fix: bootstrap5 theme: update chevron in validation-state dropdown to support dark theme - #1062

Merged
NicolasCARPi merged 1 commit into
orchidjs:masterfrom
theParitet:fix/bs5-theme-validation-chevron-dark-mode
Jul 15, 2026
Merged

fix: bootstrap5 theme: update chevron in validation-state dropdown to support dark theme#1062
NicolasCARPi merged 1 commit into
orchidjs:masterfrom
theParitet:fix/bs5-theme-validation-chevron-dark-mode

Conversation

@theParitet

Copy link
Copy Markdown
Contributor

Fixes #1061

The problem

The chevron of a dropdown does not reflect the data-bs-theme used by the Bootstrap, when being validated. This covers .is-valid, .is-invalid and container with .was-validated class. It currently only has light theme version - dark gray which can be hard to notice with dark theme.

The problem targets Bootstrap versions 5.3.x.

What changed

Small tom-select.bootstrap5.scss one line change:

background-image: escape-svg($form-select-indicator), escape-svg($icon);

changed to

background-image: var(--bs-form-select-bg-img, escape-svg($form-select-indicator)), escape-svg($icon);

in the ts-form-validation-state-selector mixin.

It gives preference to the dynamic Bootstrap variable for the chevron image that depends on the data-bs-theme directly. The fix also ensures there are no regressions, so there's the fallback for the older versions that do not offer the dark theme and --bs-form-select-bg-img Bootstrap variable.

Before/After

This was run locally before and after the change, with the CSS link pointing to dist/css/tom-select.bootstrap5.css (after running npm run build) at the project root.

Before

127 0 0 1_5502_localcheck html

After

127 0 0 1_5502_localcheck html (1)

From the dev tools:
Screenshot 2026-07-15 at 02 31 05

Tests

Steps passed locally (node 22):

  • npm test - all tests passed
  • npm run build - successful build
  • npm run stylelint - successful, no output

@theParitet

Copy link
Copy Markdown
Contributor Author

One clarification. Since I didn't mention how the light theme interacted with the change at all, here's additional manual check with the latest build on the 3 cases after my change. No regressions:

Screenshot 2026-07-15 at 03 57 56

@NicolasCARPi NicolasCARPi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@NicolasCARPi
NicolasCARPi merged commit 962050d into orchidjs:master Jul 15, 2026
6 checks passed
@theParitet
theParitet deleted the fix/bs5-theme-validation-chevron-dark-mode branch July 15, 2026 18:31
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.

[Bug]: Bootstrap 5 theme: validation with tom select dropdown chevron ignores dark theme

2 participants