Skip to content

fix(tom-select): override --bs- CSS vars with --tblr- equivalents#2644

Open
terminalchai wants to merge 1 commit into
tabler:devfrom
terminalchai:fix/tom-select-missing-variables
Open

fix(tom-select): override --bs- CSS vars with --tblr- equivalents#2644
terminalchai wants to merge 1 commit into
tabler:devfrom
terminalchai:fix/tom-select-missing-variables

Conversation

@terminalchai
Copy link
Copy Markdown

Problem

TomSelect ships a precompiled Bootstrap 5 CSS preset ( om-select.bootstrap5.css) that hardcodes --bs-* CSS custom properties — for example --bs-tertiary-bg, --bs-secondary-bg, --bs-body-bg. Tabler uses --tblr-* as its CSS variable prefix, so the Bootstrap-specific --bs-* names are undefined at runtime.

Closes #2600

Visible regression

The most impactful breakage: the active / highlighted dropdown option has no background because .ts-dropdown .active sets �ackground-color: var(--bs-tertiary-bg) which resolves to nothing:

css /* tom-select.bootstrap5.css — hardcoded --bs- names */ .ts-dropdown .active { background-color: var(--bs-tertiary-bg); } /* undefined in Tabler */ .ts-dropdown .optgroup-header { background: var(--bs-body-bg); } /* undefined */ .disabled .ts-control { background-color: var(--bs-secondary-bg); } /* undefined */ .full .ts-control { background-color: var(--bs-body-bg); } /* undefined */

Fix

Add targeted overrides in core/scss/vendor/_tom-select.scss that replace each --bs-* reference with the Tabler equivalent using the \ SCSS variable:

Broken selector Was Fixed with
.ts-dropdown .active --bs-tertiary-bg --tblr-active-bg
.ts-dropdown .active.create --bs-body-color --tblr-body-color
.ts-dropdown .optgroup-header --bs-body-bg --tblr-bg-surface
.ts-wrapper.disabled .ts-control --bs-secondary-bg --tblr-secondary-bg
.ts-wrapper.full .ts-control --bs-body-bg --tblr-body-bg

All use the SCSS \ interpolation (�ar(--#{}...)) so they stay correct if the prefix ever changes.

TomSelect's bootstrap5 preset stylesheet uses hardcoded --bs-* CSS custom
properties (e.g. --bs-tertiary-bg, --bs-secondary-bg, --bs-body-bg).
Tabler generates --tblr-* vars, so the --bs-* references are undefined
at runtime, causing visible UI regressions.

Most impactful: the active/highlighted dropdown option renders with no
background because --bs-tertiary-bg is undefined.

Add overrides in the TomSelect vendor SCSS for all affected selectors:
- .ts-dropdown .active: use --tblr-active-bg (light primary tint)
- .ts-dropdown .active.create: use --tblr-body-color
- .ts-dropdown .optgroup-header: use --tblr-bg-surface + --tblr-body-color
- .ts-wrapper.disabled .ts-control: use --tblr-secondary-bg
- .ts-wrapper.full .ts-control: use --tblr-body-bg

Fixes tabler#2600
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

⚠️ No Changeset found

Latest commit: a5fb064

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

@terminalchai is attempting to deploy a commit to the Tabler Team on Vercel.

A member of the Team first needs to authorize it.

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] Tom Select missing variables

1 participant