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.

Backdrop z-Index forced to 1050

See original GitHub issue

Bug description:

Backdrop z-Index has been forced to 1050 with inline style

<ngb-modal-backdrop style="z-index: 1050" class="modal-backdrop fade show">

this works if you use normal bootstrap.css, but i’m using bootstrap/scss and i like to configure myself the variables

in particular $zindex-modal: on my project is set much lower than 1050, and all the modals are broken with the updates.

if for some reason is not possible to change this behaviour, at least give us the possibility to configure it trough NgbModalConfig.

Thanks

Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 6.1.3

ng-bootstrap: 3.2.0

Bootstrap: 4.1.3

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

24reactions
ruch0401commented, Mar 27, 2022

::ng-deep will apply the style to all the child components. This solved the issue for me. This does in your css file.

::ng-deep ngb-modal-backdrop {
  z-index: 1050 !important;
}
10reactions
friedrichroellcommented, May 27, 2022

::ng-deep will apply the style to all the child components. This solved the issue for me. This does in your css file.

::ng-deep ngb-modal-backdrop {
  z-index: 1050 !important;
}

actually adding the style to my global styles without ng-deep did the trick for me

ngb-modal-backdrop {
    z-index: 1050 !important;
}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Opening modal from within a modal, backdrop z-index
This seems to be because the z-index of the second modal's backdrop is the same as the other and therefore the first modal...
Read more >
Developers - Backdrop z-Index forced to 1050 - - Bountysource
Bug description: Backdrop z-Index has been forced to 1050 with inline style <ngb-modal-backdrop style="z-index: 1050" class="modal-backdrop ...
Read more >
Z-index · Bootstrap v5.1
Several Bootstrap components utilize z-index , the CSS property that helps ... $zindex-modal-backdrop: 1050; $zindex-modal: 1055; $zindex-popover: 1070; ...
Read more >
Managing CSS Z-Index In Large Projects - Smashing Magazine
I had the opportunity to attempt to make z-index easier to work with for my team ... $zindex-modal-backdrop: 1040; $zindex-modal: 1050; ...
Read more >
Z-index · Boosted v5.2 - Boosted · Orange
Several Boosted components utilize z-index , the CSS property that helps ... $zindex-offcanvas: 1045; $zindex-modal-backdrop: 1050; $zindex-modal: 1055; ...
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