question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

missing css variables for modal element ^5.0.0

See original GitHub issue

Prerequisites

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:)

image image image image image

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:closed
  • Created a year ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mdocommented, Aug 20, 2022

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.

0reactions
adb-shcommented, Aug 25, 2022

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 sets display: none; you’ll have to overwrite it, when you’re using a js framework. f/e/ like this:

<div class="modal d-block">
  <div class="modal-dialog">...</div>
</div>

in Vue3 i’m doing smth like this for dynamic modals: image

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found