diff --git a/.build/css-vars-baseline.txt b/.build/css-vars-baseline.txt index cb0be0102..d1d99d7ff 100644 --- a/.build/css-vars-baseline.txt +++ b/.build/css-vars-baseline.txt @@ -58,12 +58,3 @@ --tblr-font-weight-black --tblr-gray-dark-lt --tblr-gray-lt - -# `body { text-align }` - bootstrap leaves the token unset by default, so the -# declaration never applies. ---tblr-body-text-align - -# `.nav-link` font size and the active nav link color (#2287): both drop, so a -# nav link takes the body font size and keeps the inherited color when active. ---tblr-nav-link-active-color ---tblr-nav-link-font-size diff --git a/.changeset/fix-last-dangling-tokens.md b/.changeset/fix-last-dangling-tokens.md new file mode 100644 index 000000000..d943e153d --- /dev/null +++ b/.changeset/fix-last-dangling-tokens.md @@ -0,0 +1,5 @@ +--- +"@tabler/core": patch +--- + +Defined `--tblr-body-text-align`, `--tblr-nav-link-font-size` and `--tblr-nav-link-active-color`, which the css already read. diff --git a/core/scss/_variables.scss b/core/scss/_variables.scss index c5a093ff4..45e28ac8d 100644 --- a/core/scss/_variables.scss +++ b/core/scss/_variables.scss @@ -363,7 +363,10 @@ $negative-spacers: null !default; // Body -$body-text-align: null !default; +// `start`, the property's own initial value, rather than null: `_reboot.scss` +// reads `--body-text-align` unconditionally, so a null left the declaration +// invalid. +$body-text-align: start !default; $body-color: $gray-500 !default; $body-bg: $white !default; @@ -1519,9 +1522,10 @@ $modal-status-size: $border-width-wide !default; // scss-docs-start nav-variables $nav-link-padding-y: 0.5rem !default; $nav-link-padding-x: 0.75rem !default; -$nav-link-font-size: null !default; +$nav-link-font-size: var(--body-font-size) !default; $nav-link-font-weight: null !default; $nav-link-color: var(--gray-500) !default; +$nav-link-active-color: var(--body-color) !default; $nav-link-hover-color: var(--link-hover-color) !default; $nav-link-transition: color 0.15s ease-in-out, diff --git a/core/scss/bootstrap/_root.scss b/core/scss/bootstrap/_root.scss index 943eae3a6..0e9e2e16a 100644 --- a/core/scss/bootstrap/_root.scss +++ b/core/scss/bootstrap/_root.scss @@ -75,9 +75,7 @@ @include rfs($font-size-base, --body-font-size); --body-font-weight: #{$font-weight-base}; --body-line-height: #{$line-height-base}; - @if $body-text-align != null { - --body-text-align: #{$body-text-align}; - } + --body-text-align: #{$body-text-align}; --body-color: light-dark(#{$body-color}, #{$body-color-dark}); --body-color-rgb: #{to-rgb($body-color)}; diff --git a/core/scss/ui/_nav.scss b/core/scss/ui/_nav.scss index e05d62a48..9c2f6e13f 100644 --- a/core/scss/ui/_nav.scss +++ b/core/scss/ui/_nav.scss @@ -2,6 +2,10 @@ .nav { --nav-link-hover-bg: #{color-transparent(var(--nav-link-color), 0.04)}; + // Read by `.nav-vertical .nav-link.active` below; without it that rule's + // color declaration was invalid and the active link fell back to the + // inherited color. + --nav-link-active-color: #{$nav-link-active-color}; --nav-vertical-nested-margin-start: #{$nav-vertical-nested-margin-start}; --nav-vertical-nested-padding-start: #{$nav-vertical-nested-padding-start}; --nav-link-toggle-padding-x: #{$nav-link-toggle-padding-x};