mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(overlay): hide overlay container when there are no attached overlays (#10139)
Hides the `.cdk-overlay-container` if it doesn't have any attached overlays. This prevents the browser from rendering it as a transparent overlay. Fixes #6882. Fixes #10033.
This commit is contained in:
committed by
tinayuangao
parent
51fce512e0
commit
4b528f668c
@@ -29,6 +29,12 @@ $backdrop-animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1) !default;
|
||||
.cdk-overlay-container {
|
||||
position: fixed;
|
||||
z-index: $cdk-z-index-overlay-container;
|
||||
|
||||
&:empty {
|
||||
// Hide the element when it doesn't have any child nodes. This doesn't
|
||||
// include overlays that have been detached, rather than disposed.
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
// We use an extra wrapper element in order to use make the overlay itself a flex item.
|
||||
|
||||
Reference in New Issue
Block a user