Commit 25a47537 authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI: Convert --cr-dialog-wrapper mixin to ::part(wrapper)

Bug: 973674
Change-Id: I2d9971b41bd2f399914a6ab57c995cb5f1ca383b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662730
Commit-Queue: John Lee <johntlee@chromium.org>
Reviewed-by: default avatarEsmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670260}
parent 0242f1bd
...@@ -38,6 +38,12 @@ ...@@ -38,6 +38,12 @@
width: var(--dialog-width); width: var(--dialog-width);
} }
cr-dialog::part(wrapper) {
height: 100%;
max-height: initial;
overflow: hidden;
}
cr-dialog { cr-dialog {
--cr-dialog-body: { --cr-dialog-body: {
height: 100%; height: 100%;
...@@ -52,11 +58,6 @@ ...@@ -52,11 +58,6 @@
height: 100%; height: 100%;
min-height: initial; min-height: initial;
} }
--cr-dialog-wrapper: {
height: 100%;
max-height: initial;
overflow: hidden;
}
--scroll-border: none; --scroll-border: none;
} }
</style> </style>
......
...@@ -42,10 +42,11 @@ ...@@ -42,10 +42,11 @@
width: calc(100vw - 2 * var(--print-preview-dialog-margin)); width: calc(100vw - 2 * var(--print-preview-dialog-margin));
} }
#dialog { #dialog::part(wrapper) {
--cr-dialog-wrapper: {
height: calc(100vh - 2 * var(--print-preview-dialog-margin)); height: calc(100vh - 2 * var(--print-preview-dialog-margin));
}; }
#dialog {
--cr-dialog-body-container: { --cr-dialog-body-container: {
flex: 1; flex: 1;
}; };
......
...@@ -55,12 +55,13 @@ ...@@ -55,12 +55,13 @@
} }
/* Default print preview dialog styles. */ /* Default print preview dialog styles. */
cr-dialog { cr-dialog::part(wrapper) {
--cr-dialog-wrapper: {
max-height: calc(100vh - 68px); max-height: calc(100vh - 68px);
width: calc(100vw - 68px);
max-width: 100%; max-width: 100%;
}; width: calc(100vw - 68px);
}
cr-dialog {
--cr-dialog-body: { --cr-dialog-body: {
box-sizing: border-box; box-sizing: border-box;
padding-inline-end: 20px; padding-inline-end: 20px;
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
flex-direction: column; flex-direction: column;
max-height: 100vh; max-height: 100vh;
overflow: auto; overflow: auto;
@apply --cr-dialog-wrapper;
} }
/* When needing to flex, force .body-container alone to shrink. */ /* When needing to flex, force .body-container alone to shrink. */
...@@ -196,7 +195,7 @@ ...@@ -196,7 +195,7 @@
on-cancel="onNativeDialogCancel_" part="dialog"> on-cancel="onNativeDialogCancel_" part="dialog">
<!-- This wrapper is necessary, such that the "pulse" animation is not <!-- This wrapper is necessary, such that the "pulse" animation is not
erroneously played when the user clicks on the outer-most scrollbar. --> erroneously played when the user clicks on the outer-most scrollbar. -->
<div id="content-wrapper"> <div id="content-wrapper" part="wrapper">
<div class="top-container"> <div class="top-container">
<div class="title-container" tabindex="-1"> <div class="title-container" tabindex="-1">
<slot name="title"></slot> <slot name="title"></slot>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment