/* Copyright 2023 The Chromium Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
:host > ::content > * {
margin: 0;
padding: 0;
}
dialog {
background-color: transparent;
border: none;
font-size: 100%;
height: 100%;
margin: 0;
max-height: initial;
max-width: initial;
opacity: 0;
outline: none;
overflow: hidden;
padding: 0;
width: 100%;
}
dialog[open] {
opacity: 1;
transition: opacity 200ms;
}
dialog:focus {
outline: none;
}
dialog#delete-confirm-dialog::backdrop {
background-color: transparent;
}
.thumbnail {
flex: none;
height: 100%;
width: 100%;
}
#video-poster {
max-height: 100%;
max-width: 100%;
}
#audio-artwork {
height: 100%;
margin: 0 auto;
width: 100%;
}
#mainPanel {
background-color: transparent;
bottom: 0;
margin: 0;
padding: 0;
position: absolute;
top: 56px; /* toolbar height */
width: 100%;
}
#contentPanel {
background-color: transparent;
display: flex;
height: 100%;
justify-content: center;
position: relative;
}
#contentPanel[metadata-box-active] {
margin-inline-end: 320px;
}
:host-context(html[dir='rtl']) #contentPanel[metadata-box-active] {
margin-inline-end: 320px;
margin-inline-start: auto;
}
#innerContentPanel {
background-color: var(--cros-sys-scrim);
color: var(--cros-sys-on_surface);
display: flex;
flex-direction: column;
font: var(--cros-body-1-font);
height: calc(100% - 64px);
justify-content: center;
outline: none;
padding: 32px;
position: relative;
text-align: center;
width: 100%;
}
#innerContentPanel[type='audio'],
#innerContentPanel[type='image'],
#innerContentPanel[type='video'] {
align-self: center;
}
.content {
height: 100%;
width: 100%;
}
#toolbar {
align-items: center;
background-color: var(--cros-sys-app_base);
color: var(--cros-sys-on_surface);
display: flex;
font: var(--cros-title-1-font);
height: 56px;
margin: 0;
opacity: 1;
padding: 0;
z-index: 1;
}
#file-path {
flex: 1;
margin-inline-end: 8px;
margin-inline-start: 8px;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.buttons-group {
display: flex;
}
cr-button {
--hover-bg-color: var(--cros-sys-hover_on_subtle);
--ink-color: var(--cros-sys-ripple_neutral_on_subtle);
--ripple-opacity: 100%;
--text-color: currentColor;
border: none;
border-radius: 12px;
box-shadow: none;
box-sizing: border-box;
height: 40px;
margin: 4px;
min-width: 40px;
padding: 0;
width: 40px;
}
:host-context(html.pointer-active) cr-button:not(:active):hover {
--hover-bg-color: none;
cursor: unset;
}
cr-button::after {
content: '';
height: 48px;
position: absolute;
width: 48px;
}
#back-button > .icon,
#open-button > .icon,
#delete-button > .icon,
#info-button > .icon {
-webkit-mask-position: center;
-webkit-mask-repeat: no-repeat;
background-color: currentColor;
background-image: none;
height: 36px;
width: 36px;
}
iron-icon {
height: 16px;
width: 16px;
}
#back-button > iron-icon {
display: none;
}
#back-button > .icon {
-webkit-mask-image: url(../images/files/ui/back.svg);
}
#open-button > .icon {
-webkit-mask-image: url(../images/files/ui/external_link.svg);
}
#delete-button > .icon {
-webkit-mask-image: url(../images/files/ui/delete_ng.svg);
height: 16px;
width: 16px;
}
#info-button {
--ink-color: var(--cros-sys-ripple_primary);
}
#info-button[aria-pressed=true] {
background-color: var(--cros-sys-primary_container);
color: var(--cros-sys-on_primary_container);
}
#info-button > .icon {
-webkit-mask-image: url(../images/files/ui/info.svg);
}
:host-context(html.focus-outline-visible) cr-button:not(:active):focus {
outline: 2px solid var(--cros-sys-focus_ring);
}
#metadata-box {
background-color: var(--cros-sys-app_base);
bottom: 0;
height: 100%;
margin: 0;
opacity: 1;
overflow-y: auto;
position: absolute;
right: 0;
}
:host-context(html[dir='rtl']) #metadata-box {
left: 0;
right: auto;
}
::-webkit-scrollbar {
background-color: var(--cros-sys-scrollbar);
width: 10px;
}
::-webkit-scrollbar-thumb {
background-clip: content-box;
background-color: var(--cros-sys-scrollbar_hover);
border: 2.5px solid transparent;
width: 5px;
}
[hidden] {
display: none;
}
.no-preview {
max-width: 130px;
}
.no-preview-container {
-webkit-mask-image: url(../images/files/ui/quickview_star.svg);
-webkit-mask-position: center;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 224px;
align-items: center;
background-color: var(--cros-sys-primary_container);
color: var(--cros-sys-on_primary_container);
display: flex;
flex-direction: column;
height: 224px;
justify-content: center;
}
/* Large generic thumbnails, used when a file does not have a thumbnail. */
[generic-thumbnail] {
-webkit-mask-image: url(../images/filetype/filetype_generic.svg);
-webkit-mask-position: center;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 80px;
background-color: currentColor;
height: 80px;
margin-bottom: 8px;
width: 80px;
}
[generic-thumbnail='.folder'] {
-webkit-mask-image: url(../images/filetype/filetype_folder.svg);
}
[generic-thumbnail='audio'] {
-webkit-mask-image: url(../images/filetype/filetype_audio.svg);
background-color: var(--cros-sys-error);
}
[generic-thumbnail='image'] {
-webkit-mask-image: url(../images/filetype/filetype_image.svg);
background-color: var(--cros-sys-error);
}
[generic-thumbnail='video'] {
-webkit-mask-image: url(../images/filetype/filetype_video.svg);
background-color: var(--cros-sys-error);
}