b-modal specify class for modal outer
See original GitHub issueCurrent Issue
Currently there is a way of specifying modal-class
but not to specify its outer element _modal_outer_
(the element with the z-index and position absolute on it)
This is an issue if you’d like to add a specific wrapper class to encapsulate stylings when embedding in a 3rd party page.
Possible solution
One solution would be add a prop name called modal-outer-class
that can be used to specify a class name.
Only two code changes would be needed. One to add the class as a property on b-modal vue component:
https://github.com/bootstrap-vue/bootstrap-vue/blob/dev/src/components/modal/modal.js
Above Line number 160:
modalOuterClass: {
type: [String, Array, Object],
default: null
},
Then add it to the component
Line number 379:
modalOuterStyle() {
// Styles needed for proper stacking of modals
return {
class: this.modalOuterClass,
position: 'absolute',
zIndex: this.zIndex
}
},
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Modal - Bootstrap
Use Bootstrap's JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.
Read more >Modal | Components - BootstrapVue
Modals are streamlined, but flexible dialog prompts powered by JavaScript and CSS. They support a number of use cases from user notification to...
Read more >Exposing element outside modal-backdrop in CSS Bootstrap ...
<div id="outside-element"> I want this element exposed even while the modal is active, upon clicking the button in the modal dialog box ...
Read more >W3.CSS Modal - W3Schools
The w3-modal class defines a container for a modal. The w3-modal-content class defines the modal content. Modal content can be any HTML element...
Read more >Considerations for Styling a Modal | CSS-Tricks
Keyboard focus should be trapped inside of the modal, so the user does not accidentally tab outside of the modal (a.k.a. “escaping 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
@fl-frontend You can add an id to the
<b-modal id="example">
and the modal_outer id will be replaced to<div id="example___BV_modal_outer_" style="position: absolute; z-index: 1040;">
. You can reference it in css with#example___BV_modal_outer_
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!