missing css variables for modal element ^5.0.0
See original GitHub issuePrerequisites
- I have searched for duplicate or closed issues
- I have validated any HTML to avoid common problems
- I have read the contributing guidelines
Describe the issue
i’m using vue3 with vite.
bootstrap is imported like this in main.ts
:
import "bootstrap/scss/bootstrap.scss";
(gray values are undefined:)
Reduced test cases
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of Bootstrap are you using?
v5.0.2, v5.2.0
Issue Analytics
- State:
- Created a year ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
How to use CSS variables with Bootstrap 5? - Stack Overflow
So you can't override CSS by changing bootstrap CSS variables, I think they added CSS variables to allow us to style our own...
Read more >Custom properties (--*): CSS variables - MDN Web Docs
Custom properties are scoped to the element(s) they are declared on, and participate in the cascade: the value of such a custom property...
Read more >Modal · Bootstrap v5.0
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >CSS Component: Modal - If Design System
modal : add CSS Variables to Modal Component (69354fb), closes #587389 ... Add missing imports of typography CSS variables (e716c65), closes #559412.
Read more >Everything you need to know about CSS Variables
There's no variable declaration on the paragraph element. You may have expected the color to be blue owing to the declaration on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, as mentioned above, all the variables for each component are on specific classes, on this case
.modal
. This is shown in our documentation for each component.thanks for the help. just updated from bootstrap 4 to 5 and didn’t notice, that some variables got scoped in another way. as you have to set the
.modal
-class, which also setsdisplay: none;
you’ll have to overwrite it, when you’re using a js framework. f/e/ like this:in Vue3 i’m doing smth like this for dynamic modals: