-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Add CSS variables for all color variations #39587
Comments
This comment was marked as spam.
This comment was marked as spam.
In total this would mean just 80 additional css variables to make all colors available. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@axelfontaine just clarifying the issue, in the |
I would like to add the request to add all values, also computed ones, as CSS variables to the Use CaseOften I want to style elements in a way that matches predefined elements. For instance, a Suggested solutionAdd new CSS variables to the HTML node for each value used in CSS. For instance, in the use case I’m interested in bootstrap/scss/mixins/_buttons.scss Line 25 in cb7467b
#32424 mentions that you intend to keep the size of the compiled CSS file low, so this feature may not be desirable by default. The file size explosion can be circumvented by providing these definitions in separate files. These can be left out of the default bundle, but still be available in custom builds; for instance as Alternatives consideredIf I’m not mistaken, the computed values, for instance |
Prerequisites
Proposal
The full list of Bootstrap colors is available at
https://getbootstrap.com/docs/5.3/customize/color/#all-colors
It would be nice to be able to refer to these using css variables such as
--bs-blue-300
or--bs-color-blue-300
. This is a compromise that doesn't suffer from the size explosion problem like generating all utilities would.Motivation and context
This would help adding additional accents to a design, while sticking to the overall harmoneous color palette.
The text was updated successfully, but these errors were encountered: