Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit c6bca1f

Browse files
phantomessenshahan
authored andcommitted
Always keep a transparent scroll stroke to prevent dialog from shifting.
PiperOrigin-RevId: 260179379
1 parent 0341813 commit c6bca1f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

angular_components/lib/material_dialog/material_dialog.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<div class="error" [class.expanded]="error != null">{{error}}</div>
1313

1414
<main #main role="presentation"
15+
[class.with-scroll-strokes]="shouldShowScrollStrokes"
1516
[class.top-scroll-stroke]="shouldShowTopScrollStroke"
1617
[class.bottom-scroll-stroke]="shouldShowBottomScrollStroke">
1718
<ng-content></ng-content>

angular_components/lib/material_dialog/material_dialog.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,17 @@ main {
8787
padding: 0 $mat-grid * 3;
8888
width: 100%;
8989

90+
&.with-scroll-strokes {
91+
border-bottom: 1px transparent solid;
92+
border-top: 1px transparent solid;
93+
}
94+
9095
&.top-scroll-stroke {
91-
border-top: 1px $mat-gray-300 solid;
96+
border-top-color: $mat-gray-300;
9297
}
9398

9499
&.bottom-scroll-stroke {
95-
border-bottom: 1px $mat-gray-300 solid;
100+
border-bottom-color: $mat-gray-300;
96101
}
97102
}
98103

0 commit comments

Comments
 (0)