Skip to content

Commit 130907c

Browse files
committed
Add extra comments regarding the flex wrapper.
1 parent 52c50ce commit 130907c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/lib/core/overlay/_overlay.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
z-index: $md-z-index-overlay-container;
2626
}
2727

28-
// Wrapper element for the panes that use the GlobalPositionStrategy.
28+
// We use an extra wrapper element in order to use make the overlay itself a flex item.
29+
// This makes centering the overlay easy without running into the subpixel rendering
30+
// problems tied to using `transform` and without interfering with the other position
31+
// strategies.
2932
.md-global-overlay-wrapper {
3033
display: flex;
3134
position: absolute;

src/lib/core/overlay/position/global-position-strategy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export class GlobalPositionStrategy implements PositionStrategy {
1515
private _rightOffset: string = '';
1616
private _alignItems: string = '';
1717
private _justifyContent: string = '';
18+
19+
/* A lazily-created wrapper for the overlay element that is used as a flex container. */
1820
private _wrapper: HTMLElement;
1921

2022
/** Sets the top position of the overlay. Clears any previously set vertical position. */

0 commit comments

Comments
 (0)