X Tutup
Skip to content

fix: restore card-cap-bg variable support in .card-header#2626

Open
terminalchai wants to merge 1 commit intotabler:devfrom
terminalchai:fix/card-header-cap-bg-override
Open

fix: restore card-cap-bg variable support in .card-header#2626
terminalchai wants to merge 1 commit intotabler:devfrom
terminalchai:fix/card-header-cap-bg-override

Conversation

@terminalchai
Copy link

Description

Fixes #2417

Problem

The .card-header rule in _cards.scss used the shorthand �ackground: transparent, which resets all background sub-properties. This silently overrides Bootstrap's earlier rule:

\\css
.card-header {
background-color: var(--tblr-card-cap-bg); /* set by Bootstrap */
}
\\

Because \�ackground: transparent\ comes later in the cascade (Tabler overrides Bootstrap), the --tblr-card-cap-bg\ CSS custom property has no visible effect, making it impossible for consumers to customise the card header background via the variable.

Fix

Replace the shorthand with the specific property:

\\diff

  • background: transparent;
  • background-color: var(--#{}card-cap-bg);
    \\

This respects the CSS custom property while keeping the same default behaviour — \-cap-bg\ defaults to \�ar(--tblr-bg-surface-tertiary)\ which is effectively transparent in most themes.

…#2417

Replace the �ackground: transparent shorthand with �ackground-color: var(--tblr-card-cap-bg).

The shorthand �ackground property resets all background sub-properties, silently
overriding Bootstrap's �ackground-color: var(--tblr-card-cap-bg) rule that precedes
it in the cascade. This makes the --tblr-card-cap-bg CSS custom property have no
visible effect when overridden by consumers.

Using �ackground-color: var(--#{}card-cap-bg) instead fixes the issue while
preserving the intended variable-driven customization.
@vercel
Copy link

vercel bot commented Mar 6, 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] --tblr-card-cap-bg no longer applies to .card-header

1 participant

X Tutup