Replies: 1 comment
-
|
Yes, that’s correct. Right now, because bootstrap.scss @uses components directly without @forward, consumers cannot override component-level SCSS variables when importing Bootstrap. Using @forward in bootstrap.scss would allow this pattern: This would make it much easier for users to customize component defaults at import time, rather than having to override variables separately before each component @use. Essentially, @forward acts as a proper public API for SCSS variables. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @mdo 👋
First of all, thank you for all the work on v6-dev; it looks really promising. I write here because the conversation in PR has been locked and limited to collaborators.
I have a question/suggestion about how variables are exposed in
scss/bootstrap.scss, and how consumers can override them.What I noticed
In
bootstrap.scss, the components and utility styles are included directly (via@use) rather than being re-exported through an entry-point that could allow variable overriding by the consumer viawith(...). For example, the structure is roughly:This approach means consumers cannot override component variables (like padding, color, etc.) at the moment of
@use 'bootstrap' with (…);becausebootstrap.scssdoesn't@forwardthose component variables.Why
@forwardmight be usefulUsing
@forwardinbootstrap.scssallows users to override defaults, e.g.:Beta Was this translation helpful? Give feedback.
All reactions