It isn't always practical to make new elements in your CSS file. If you want to adapt something, you always need to search where again have I defined the width, style, did I define it already, ...

I find it easier to include it directly in my code. For b-model, I found the following solution:

<div>
  <b-modal size="xl" title="Very large model"></b-modal>
  <b-modal size="lg" title="Large model"></b-modal>
  <b-modal size="sm" title="Small model"></b-modal>
</div>

It works for my version Bootstrap v4.3.

Answer from ageans on Stack Overflow
🌐
BootstrapVue
bootstrap-vue.org › docs › components › modal
Modal | Components | BootstrapVue
When BootstrapVue is installed as a plugin, or the ModalPlugin plugin is used, BootstrapVue will inject a $bvModal object into every Vue instance (components, apps). this.$bvModal exposes several methods, of which two are for showing and hiding modals: Both methods return immediately after being called.
🌐
GitHub
github.com › bootstrap-vue › bootstrap-vue › issues › 5069
b-modal is mounted all the time · Issue #5069 · bootstrap-vue/bootstrap-vue
April 2, 2020 - I have b-modal on the page. b-modal has property v-model="show" and b-modal is shown when related button is clicked. The problem is that b-modal got render, created and mounted, even if button was not clicked. It causes to specific api calls from modal to load modal content.
Author   m-demydiuk
🌐
GitHub
github.com › bootstrap-vue › bootstrap-vue › issues › 1048
how to use the slot of b-modal? · Issue #1048 · bootstrap-vue/bootstrap-vue
February 7, 2017 - here is the code, I got a blank header with close button,and the title like a content with a grey cross line. <!-- the modal template --> <b-modal id="merchantDetailModal" size="lg" ref="merchantDetailModal"> <div class="modal-header"> {{postDetail.title}} </div> <div> <!--model content--> <div class="merchantModalContent"> {{postDetail.content}} </div> </div> </b-modal>
Author   amigoge
🌐
Bootstrap-vue-next
bootstrap-vue-next.github.io › bootstrap-vue-next › docs › components › modal.html
Modal | BootstrapVueNext
Modals, when visible, are rendered appended to the <body> element via Vue's <Teleport> component. The placement of the <BModal> component will not affect layout, as it always renders as a placeholder comment node (<!---->).
🌐
Netlify
builderall-vue-ui.netlify.app › bootstrap › b-modal.html
Modal | Builderall Vue UI
<div> <b-button v-b-modal.modal-1>Launch demo modal</b-button> <b-modal id="modal-1" title="BootstrapVue" centered no-fade> <p class="my-4">Hello from modal!</p> </b-modal> </div>
Top answer
1 of 4
4

If you want to put the modal into the specific position, below is my solutuon:

  1. add specific class to <b-modal> by its props=modal-class

  2. then add your styles into myclass > div

You can look into the github (line#:176), Bootstrap-vue will place one div.modal-content(including header/body/foot) into one div with class="modal-dialog" which is the direct child of root.

That is why above solution use the css selector = .myclass > div.

If you look into the dom tree: the structure of one bootstrap-vue modal will be:

one root div (myclass will be added into here) -> one div with modal-dialog -> one div with modal-content -> header/body/footer

Below is one sample: (I put different background-color for modal-dialog, modal-content.)

app = new Vue({ //not vue, it is Vue
  el: "#app",
  data: {
    myclass: ['myclass']
  },
  methods: {
    showModal: function(){
      this.$refs.myModalRef.show()
    }
  }
})
.myclass > div {
  position:absolute !important;
  top: -10px !important;
  left: -10px !important;
  background-color:yellow !important;
}

.myclass > .modal-dialog > .modal-content {
  background-color:red !important;
}
<!-- Add this to <head> -->
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css"/>

<!-- Add this after vue.js -->
<script src="https://unpkg.com/[email protected]/dist/vue.js"></script>
<script src="//unpkg.com/babel-polyfill@latest/dist/polyfill.min.js"></script>
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js"></script>
<div id="app">
    <b-button @click="showModal">
      Open Modal
    </b-button>
  <b-modal ref="myModalRef" :modal-class="myclass" size="lg">
      <h2>Test</h2>
  </b-modal>
</div>

2 of 4
2

I use

<b-modal
    body-class="modalcart"
    ref="addToCart"
    id="addToCarModal"
    hide-footer
    hide-header
>
<b-container class="text-center modal-product-content">
  <img class="modal-image" src="~/assets/images/add-to-cart.png" alt=""/>

and:

<style lang="scss" scoped>
/deep/ .modalcart {
  font-family: 'poppins-bold';
  /deep/ .modal-product-content {
    padding: 3rem;
    margin: 0 auto !important;
    /deep/ .modal-image {
      height: 150px;
      margin-bottom: 2rem;
      }
    }
  ...
  }
  </style>

and work! thanks
Keep in mind that not work without body-class and /deep/ I use node-sass, vue 3, vue-loader 15

🌐
Bootstrap
getbootstrap.com › docs › 4.1 › components › modal
Modal · Bootstrap
Tooltips and popovers can be placed within modals as needed. When modals are closed, any tooltips and popovers within are also automatically dismissed. ... This button triggers a popover on click.
Find elsewhere
🌐
GitHub
github.com › bootstrap-vue › bootstrap-vue › issues › 4886
b-modal specify class for modal outer · Issue #4886 · bootstrap-vue/bootstrap-vue
October 28, 2019 - Current 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 yo...
Author   fl-frontend
🌐
Buefy
buefy.org › documentation › modal
Modal
Buefy is a lightweight library of responsive UI components for Vue.js based on Bulma framework and design.
🌐
Pietro Grinders
pietrogrinders.com › home › accessories › multipurpose (b-modal) burrs
MultiPurpose (B-Modal) Burrs
MultiPurpose (B-Modal) Burrs
When you purchase your Pietro, you can choose the model that best suits your preparations between MultiPurpose and ProBrewing. MultiPurpose grinds enhance smoothness and body, while with ProBrewing grinds you will find a clearer and cleaner flavour.Want to try different extraction profiles?No problem, Pietro's burrs are interchangeable and you can easily replace them by buying the spare burrs set.
Price   €75.00
🌐
MDBootstrap
mdbootstrap.com › standard › modal
Vue Bootstrap Modal - free examples & tutorial
Use MDB modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content. Note: Read the API tab to find all available options and advanced customization · Click the button to launch the modal.
🌐
UNPKG
app.unpkg.com › bootstrap-vue@1.3.0 › files › es › components › modal › README.md
UNPKG
You can customize the size of the ... using the `ok-variant` and `cancel-variant` props, and provide custom button content using the `ok-title` and `cancel-title` props, or using the named slots `modal-ok` and `modal-cancel`. `<b-modal>` supports close on ESC (enabled by default), ...
🌐
GitHub
github.com › bootstrap-vue › bootstrap-vue › issues › 3961
<b-modal>: Set dynamically the exact width · Issue #3961 · bootstrap-vue/bootstrap-vue
August 28, 2019 - I load the image from the server with Axios -> then convert to Base64 -> set into the src. I discovered that into div associated with dialog-class is set dialog-modal what contains max-width and min-width based in b-modal size ( sm, lg, xl ).
Author   darkman97i
🌐
Asper
docs.asper.one › bootstrap-vue-151 › docs › components › modal
Modal - BootstrapVue
These features may be disabled by setting the the props no-close-on-esc, no-close-on-backdrop, and hide-header-close respectively. You can override the modal title via the named slot modal-title, override the header completely via the modal-header slot, and override the footer completely via ...
🌐
Modal
modal.com › blog › announcing-our-series-b
Announcing our $87M Series B
GLM-5 is available to try on Modal. Get started ... We’re excited to announce that we have raised more than $80M in a Series B round, led by Lux Capital, with existing investors participating as well. Our post-money valuation is $1.1B.