fix: restore card-cap-bg variable support in .card-header#2626
Open
terminalchai wants to merge 1 commit intotabler:devfrom
Open
fix: restore card-cap-bg variable support in .card-header#2626terminalchai wants to merge 1 commit intotabler:devfrom
terminalchai wants to merge 1 commit intotabler:devfrom
Conversation
…#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.
|
@terminalchai is attempting to deploy a commit to the Tabler Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
\\
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.