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

fix(brand): Fix and improve Bootstrap variable handling #11168

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

gadenbuie
Copy link
Collaborator

@gadenbuie gadenbuie commented Oct 23, 2024

  1. Adding missing g flag in the regex that sanitizes brand.color.palette names for use in Sass and CSS variables.

  2. Drop gray and gray-dark from Bootstrap color variables list. These appear in Bootstrap's $colors map but are derived from the gray color palette, and are not top-level color Sass variables.

  3. Drop the brand.defaults.bootstrap.version check. On second thought, I imagine Quarto plans to support at most one version of Bootstrap at a time. You might want to throw a warning if someone asks for BS 5 after Quarto moves to BS 6 (in some distant future), but we don't need the version check now.

    Furthermore, in the defaults layer there's very little risk in setting Sass variables across Boostrap versions. Since they're all defined with ${var}: {value} !default;, either they'll be used by Bootstrap or they won't. So the chance of breakage is small.

@cscheid cscheid merged commit d41bf1b into main Oct 23, 2024
47 checks passed
@cscheid cscheid deleted the fix/brand-bootstrap branch October 23, 2024 21:17
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.

2 participants