Modal example 2

From Bootstrap for MediaWiki
Component
Name Modal
Description Modal styled with CSS
Provider BootstrapComponents
Reference BootstrapComponents Extension docs - modal
Styling For all possible color styles and corresponding examples, see colors.
Updated for Bootstrap 5. Parts of this page's Bootstrap 4 code no longer work with Bootstrap 5. Wikis moving to Bootstrap 5, for example with Chameleon 6, need to update such content too. See the Bootstrap 4 version of this page.

Custom CSS

Note: CSS passed to the style tag will be applied on the modal container which covers the entire page, not only to the modal dialog. To change the modal dialog, use the class tag and the modal inner classes as shown below.

Code
<bootstrap_modal text="Click here!" color="info" heading="Heading goes here" footer="You can also add some footer." style="background-color: rgba(0,0,0,.3);" class="bootstrap-modal-example">Hello!

[[File:DSC02166 363.jpg|class=img-fluid]]</bootstrap_modal>

On MediaWiki:Common.css or MediaWiki:Chameleon.css:

.bootstrap-modal-example .modal-content {
  background-color: var(--bs-light);
}
Result