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.

Modal header has explicit "rounded-top" class

See original GitHub issue

When adding headerBgVariant="dark" to a modal, the rendered <header> elements has an explicit rounded-top class added to it. This is not compatible with using Bootstrap SCSS and setting $enable-rounded: false;.

This only happens when adding a variant (doesn’t seem to matter which).

bootstrap-vue-modal

A default Bootstrap modal already has rounded corners (in accordance with $enable-rounded: false;, so I would think these added classes are either unnecessary, or should be configurable in Vue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
dflockcommented, Feb 10, 2018

This seems to be back for me, with these versions:

"bootstrap": "4.0.0",
"bootstrap-vue": "2.0.0-rc.1",

I think the correct workaround is to fix the element that’s sticking out underneath the header - the .modal-content - not the header itself. If you apply this to the .modal-content, it fixes it:

border-top-right-radius: 10px;
border-top-left-radius: 10px;
0reactions
tmorehousecommented, Apr 22, 2020

Another quick fix is using CSS:

.modal-content {
  overflow: hidden;
}

To make the background colors clipped to the border box (modal-container is what has the rounded corners)

One caveat is that this can affect overflowing modals i.e. dropdown menus or popovers/tooltips that need to show past the edge of the modal content.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modal - Bootstrap
We ask that you include modal headers with dismiss actions whenever possible, or provide another explicit dismiss action.
Read more >
modal-header loses top left and right radius when new ...
1 Answer 1 ... That's because border radius in Bootstrap is applied to the .modal-content and by default .modal-header doesn't have a background....
Read more >
Bootstrap CSS class: modal-body - Shuffle
Bootstrap CSS class modal-body with source code and live preview. You can copy the example and paste it ... accordion-header ... rounded-top. Breadcrumbs....
Read more >
Modals | Accessibility Guidelines
<button> Activate Modal </button> </main> <div class='modal'> <Modal Content> ... After the modal aria-hidden attribute has been set to false and it's ...
Read more >
Modal - Paper Kit by Creative Tim
Below is a static modal example (meaning its position and display have been overridden). Included are the modal header, modal body (required for...
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