<style>
#dialog {
box-sizing: border-box;
display: flex;
flex-direction: column;
height: 379px;
width: 512px;
}
#dialog:focus-visible {
outline: none;
}
#title {
color: var(--cros-sys-on_surface);
font: var(--cros-headline-1-font);
/* override the default margin for H1. */
margin: 0;
padding-block-end: 8px;
padding-block-start: 24px;
padding-inline: 24px;
}
#content {
border-top: 1px solid transparent;
display: flex;
flex-direction: column;
flex-grow: 1;
overflow: scroll;
padding-inline: 24px;
}
#content.separator-top {
border-top: 1px solid var(--cros-separator-color);
}
#content.fade-bottom::after {
background: linear-gradient(transparent 0,
var(--cros-sys-app_base) 100%);
bottom: 88px; /* button container + padding */
content: '';
height: 20px;
left: 0;
pointer-events: none;
position: absolute;
width: 100%;
}
@media (prefers-color-scheme: dark) {
#content.fade-bottom::after {
background: linear-gradient(transparent 0,
var(--cros-bg-color-elevation-3) 100%);
}
}
#button-container {
display: flex;
justify-content: flex-end;
padding-block-end: 24px;
padding-block-start: 32px;
padding-inline: 24px;
}
cr-button {
--active-bg: transparent;
--active-shadow: none;
--active-shadow-action: none;
--bg-action: var(--cros-sys-primary);
--cr-button-height: 36px;
--disabled-bg-action:
var(--cros-sys-disabled_container);
--disabled-bg: var(--cros-sys-disabled_container);;
--disabled-text-color: var(--cros-sys-disabled);
/* Use the default bg color as hover color because we
rely on hoverBackground layer below. */
--hover-bg-action: var(--cros-sys-primary);
--hover-bg-color: var(--cros-sys-primary_container);
--ink-color: var(--cros-sys-ripple_primary);
--ripple-opacity-action: 1;
--ripple-opacity: 1;
--text-color-action: var(--cros-sys-on_primary);
--text-color: var(--cros-sys-on_primary_container);
border: none;
border-radius: 18px;
box-shadow: none;
}
cr-button.cancel-button {
background-color: var(--cros-sys-primary_container);
}
cr-button.cancel-button:hover::part(hoverBackground) {
background-color: var(--cros-sys-hover_on_subtle);
display: block;
}
cr-button.action-button:hover::part(hoverBackground) {
background-color: var(--cros-sys-hover_on_prominent);
display: block;
}
:host-context(.focus-outline-visible) cr-button:focus {
outline: 2px solid var(--cros-sys-focus_ring);
outline-offset: 2px;
}
</style>
<!-- autofocus for screen reader to read header on dialog open-->
<div id="dialog" role="dialog" autofocus tabindex="-1" aria-labelledby="title">
<div id="header">
<h1 id="title"></h1>
</div>
<div id="content" role="listbox" aria-multiselectable="false" tabindex="-1"
aria-label="Application options"></div>
<div id="button-container">
<cr-button class="cancel-button">$i18n{cancel}</cr-button>
<cr-button class="action-button">$i18n{open}</cr-button>
</div>
</div>