Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown Header font size now references a css variable #39381

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

craigiswayne
Copy link
Contributor

Description

Dropdown Header Font Size now references a css variable which can be overridden

Motivation & Context

Previously the font-size referenced a SASS variable which can only be overridden by recompiling the library using SASS.

By using a css variable, users won't need to override the SASS variable, but rather the CSS variable.

With this change, both methods can still be used to override the value, i.e. using SASS or using CSS

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

n/a

However this resulting css may be of help

Before

.dropdown-header {
  display: block;
  padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);
  margin-bottom: 0;
  font-size:.875rem;
  color: var(--bs-dropdown-header-color);
  white-space: nowrap
}

After

.dropdown-header {
  display: block;
  padding: var(--bs-dropdown-header-padding-y) var(--bs-dropdown-header-padding-x);
  margin-bottom: 0;
  font-size: var(--bs-dropdown-header-font-size); // <-------------
  color: var(--bs-dropdown-header-color);
  white-space: nowrap
}

Related issues

Searched for dropdown header related issues, none were found.

@craigiswayne craigiswayne requested a review from a team as a code owner November 8, 2023 20:42
@julien-deramond
Copy link
Member

Thanks for this PR @craigiswayne
I think this is something we can consider for v5.4, in the spirit of what we have for other components to make them more customizable. We'll review the PR after v5.3.3 :)

Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

LGTM! FYI I just moved up the variables in the files to respect a kind of order in our files (not enforced by any tools).
So the target release version should be v5.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready to merge
Development

Successfully merging this pull request may close these issues.

None yet

3 participants