pdf.js.mirror/web/views_manager.css
Calixte Denizet b4d028132b Sync the viewer chrome with the Firefox design system
The chrome is now authored against Firefox design-token names with the shipped
value as a fallback `var(--fx-token, <literal>)` so colors, borders and radii
follow Firefox instead of having to be re-synced by hand.

In MOZCENTRAL viewer.css imports chrome://global/skin/design-system/tokens-brand.css,
gated on the new pdfjs.enableNova pref (default false, read straight from CSS via -moz-pref()).
With the pref off the sheet isn't applied, every fallback resolves, and the
viewer renders as before, as it also does in the GENERIC and components builds,
which never see the chrome sheet.

Consuming a token means never declaring its name in an unlayered rule, which
would shadow Firefox's for the whole subtree; --focus-outline, --border-color and
--text-color/--button-border-color are therefore renamed to
--editor-selection-outline, --signature-border-color and --views-*. In forced
colors each state reads a matching background/foreground/border triple so it
can't collapse to a single system color.

The dialog button styling also moves out of `.dialog .mainContainer button` into
a shared .primaryButton/.secondaryButton primitive (buttons.css, imported from
pdf_viewer.css so the components build gets it too). The password,
document-properties, print and undo-bar buttons use it in place of .dialogButton,
and the custom radio appearance gives way to native controls tinted with
accent-color.
2026-07-30 23:13:43 +02:00

984 lines
30 KiB
CSS

/* Copyright 2025 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#outerContainer {
&.viewsManagerMoving {
#viewsManager {
visibility: visible;
}
}
&.viewsManagerOpen {
#viewsManager {
visibility: visible;
inset-inline-start: 8px;
}
#viewerContainer:not(.pdfPresentationMode) {
inset-inline-start: var(--viewsManager-width, 0);
transition-property: inset-inline-start;
}
}
&.viewsManagerResizing :is(#sidebarContainer, #viewerContainer, #loadingBar) {
/* Improve responsiveness and avoid visual glitches when the sidebar is resized. */
transition-duration: 0s;
}
}
#viewsManager {
--views-manager-button-icon: url(images/pages_viewButton.svg);
--views-manager-button-arrow-icon: url(images/pages_viewArrow.svg);
--views-manager-add-file-button-icon: url(images/toolbarButton-zoomIn.svg);
--current-outline-button-icon: url(images/toolbarButton-currentOutlineItem.svg);
--menuitem-thumbnailsView-icon: url(images/pages_viewButton.svg);
--menuitem-outlinesView-icon: url(images/toolbarButton-viewOutline.svg);
--menuitem-attachmentsView-icon: url(images/toolbarButton-viewAttachments.svg);
--menuitem-layersView-icon: url(images/toolbarButton-viewLayers.svg);
--manage-button-icon: url(images/toolbarButton-pageDown.svg);
--close-button-icon: url(images/pages_closeButton.svg);
--undo-label-icon: url(images/altText_done.svg);
--pages-selected-icon: url(images/pages_selected.svg);
--spinner-icon: url(images/altText_spinner.svg);
--sidebar-bg-color: light-dark(rgb(255 255 255 / 0.92), rgb(66 65 77 / 0.92));
--sidebar-backdrop-filter: blur(7px);
--sidebar-width: 230px;
--sidebar-min-width: min-content;
--sidebar-max-width: 50vw;
--sidebar-block-padding: 8px;
--views-text-color: var(--text-color, light-dark(#15141a, #fbfbfe));
--button-fg: var(--views-text-color);
--button-no-bg: var(--button-background-color-toolbar, transparent);
--button-bg: var(
--button-background-color,
light-dark(rgb(21 20 26 / 0.07), rgb(251 251 254 / 0.07))
);
--views-button-border-color: var(--button-border-color, transparent);
--button-hover-bg: var(
--button-background-color-hover,
light-dark(rgb(21 20 26 / 0.14), rgb(251 251 254 / 0.14))
);
--button-hover-fg: var(--views-text-color);
--button-hover-border-color: var(--views-button-border-color);
--button-active-bg: var(
--button-background-color-active,
light-dark(rgb(21 20 26 / 0.21), rgb(251 251 254 / 0.21))
);
--button-active-fg: var(--views-text-color);
--button-active-border-color: var(--views-button-border-color);
--button-focus-no-bg: color-mix(
in srgb,
var(--views-text-color),
transparent 93%
);
--button-focus-outline-color: var(
--focus-outline-color,
light-dark(#0062fa, #00cadb)
);
--button-focus-border-color: light-dark(white, black);
--status-border-color: transparent;
--status-actions-bg: light-dark(
rgb(21 20 26 / 0.03),
rgb(251 251 254 / 0.03)
);
--status-undo-bg: light-dark(rgb(0 98 250 / 0.08), rgb(0 202 219 / 0.08));
--status-waiting-bg: var(--status-undo-bg);
--indicator-color: var(--color-accent-primary, light-dark(#0062fa, #00cadb));
--status-warning-bg: light-dark(#ffe8ea, #6e001f);
--indicator-warning-color: light-dark(#b20037, #ffa0aa);
--header-shadow:
0 0.25px 0.75px -0.75px light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)),
0 2px 6px -6px light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--header-bg: light-dark(rgb(255 255 255 / 0.92), #42414e);
--image-outline: none;
--image-border-width: 6px;
--image-border-color: light-dark(#cfcfd8, #3a3944);
--image-hover-border-color: #bfbfc9;
--image-current-border-color: var(--button-focus-outline-color);
--image-current-focused-outline-color: var(--image-hover-border-color);
--image-page-number-bg: light-dark(#f0f0f4, #42414d);
--image-page-number-fg: var(--views-text-color);
--image-page-number-border-color: transparent;
--image-hover-page-number-bg: var(--image-page-number-bg);
--image-hover-page-number-fg: var(--image-page-number-fg);
--image-current-page-number-bg: var(--image-current-border-color);
--image-current-page-number-fg: light-dark(#fff, #15141a);
--image-current-hover-page-number-bg: var(--image-current-page-number-bg);
--image-current-hover-page-number-fg: var(--image-current-page-number-fg);
--image-shadow:
0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)),
0 0 0 1px var(--image-border-color),
0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-hover-shadow:
0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)),
0 0 0 1px light-dark(rgb(21 20 26 / 0.1), rgb(251 251 254 / 0.1)),
0 0 0 var(--image-border-width) var(--image-hover-border-color),
0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-current-shadow:
0 0.375px 1.5px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)),
0 0 0 var(--image-border-width) var(--image-current-border-color),
0 3px 12px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4));
--image-dragging-placeholder-bg: light-dark(
rgb(0 98 250 / 0.08),
rgb(0 202 219 / 0.08)
);
--image-dragging-placeholder-border: var(--image-outline);
--multiple-dragging-bg: white;
--image-multiple-dragging-shadow:
0 0 0 var(--image-border-width) var(--image-current-border-color),
var(--image-border-width) var(--image-border-width) 0
calc(var(--image-border-width) / 2) var(--multiple-dragging-bg),
var(--image-border-width) var(--image-border-width) 0
calc(3 * var(--image-border-width) / 2) var(--image-current-border-color);
--image-dragging-shadow: 0 0 0 var(--image-border-width)
var(--image-current-border-color);
--multiple-dragging-indicator-bg: var(--indicator-color);
--multiple-dragging-text-color: light-dark(#fbfbfe, #15141a);
@media screen and (forced-colors: active) {
--views-text-color: var(--text-color, CanvasText);
--button-fg: var(--button-text-color, ButtonText);
--button-bg: var(--button-background-color, ButtonFace);
--button-no-bg: var(--button-background-color, ButtonFace);
--views-button-border-color: var(--button-border-color, ButtonText);
--button-hover-bg: var(--button-background-color-hover, SelectedItemText);
--button-hover-fg: var(--button-text-color-hover, SelectedItem);
--button-hover-border-color: var(--button-border-color-hover, SelectedItem);
--button-active-bg: var(--button-background-color-active, SelectedItemText);
--button-active-fg: var(--button-text-color-active, SelectedItem);
--button-active-border-color: var(--button-border-color-active, ButtonText);
--button-focus-no-bg: var(--button-background-color, ButtonFace);
--button-focus-outline-color: var(--focus-outline-color, CanvasText);
--button-focus-border-color: none;
--status-border-color: CanvasText;
--status-undo-bg: none;
/* Painted on Canvas panels, so --text-color rather than the accent (which
is ButtonText in Firefox HCM). */
--indicator-color: var(--text-color, CanvasText);
--status-warning-bg: none;
--indicator-warning-color: CanvasText;
--header-shadow: none;
--image-shadow: none;
--image-outline: 1px solid ButtonText;
--image-focus-outline-color: CanvasText;
--image-hover-border-color: SelectedItem;
--image-hover-page-number-bg: SelectedItemText;
--image-hover-page-number-fg: SelectedItem;
--image-current-page-number-bg: ButtonText;
--image-current-page-number-fg: ButtonFace;
--image-current-border-color: var(--border-color, ButtonText);
--image-current-focused-outline-color: var(--image-hover-border-color);
--image-current-hover-page-number-bg: SelectedItem;
--image-current-hover-page-number-fg: SelectedItemText;
--image-page-number-bg: ButtonFace;
--image-page-number-fg: ButtonText;
--image-page-number-border-color: var(--image-page-number-fg);
--multiple-dragging-bg: Canvas;
--multiple-dragging-indicator-bg: var(--text-color, ButtonBorder);
--multiple-dragging-text-color: Canvas;
--image-dragging-placeholder-bg: Canvas;
--image-dragging-placeholder-border: 1px GrayText solid;
}
display: flex;
padding-bottom: 16px;
flex-direction: column;
align-items: flex-start;
inset-block-start: calc(100% + var(--sidebar-block-padding));
height: calc(
var(--viewer-container-height) - 2 * var(--sidebar-block-padding)
);
position: absolute;
inset-inline-start: calc(
-1 * var(--viewsManager-width, --sidebar-width) - 1px
);
transition-property: inset-inline-start;
transition-duration: var(--sidebar-transition-duration);
transition-timing-function: var(--sidebar-transition-timing-function);
.sidebarResizer {
inset-inline-start: calc(100% + 4px);
}
.viewsManagerButton {
width: auto;
color: var(--button-fg);
border-radius: var(--button-border-radius, 8px);
border: 1px solid var(--views-button-border-color);
background: var(--button-bg);
&:hover {
background-color: var(--button-hover-bg) !important;
color: var(--button-hover-fg) !important;
border-color: var(--button-hover-border-color) !important;
&::before {
background-color: var(--button-hover-fg) !important;
}
}
&:active {
background: var(--button-active-bg) !important;
color: var(--button-active-fg) !important;
border-color: var(--button-active-border-color) !important;
&::before {
background-color: var(--button-active-fg) !important;
}
}
&:focus-visible {
outline: 2px solid var(--button-focus-outline-color);
outline-offset: 2px;
border-color: var(--button-focus-border-color);
}
&.viewsCloseButton {
width: var(--size-item-large, 26px);
height: var(--size-item-large, 26px);
border-radius: var(--button-border-radius, 8px);
background: none;
display: flex;
align-items: center;
justify-content: center;
&::before {
width: 16px;
height: 16px;
mask-image: var(--close-button-icon);
}
}
}
#viewsManagerHeader {
display: flex;
flex-direction: column;
align-items: flex-start;
align-self: stretch;
width: 100%;
box-shadow: var(--header-shadow);
flex: 0 0 auto;
background-color: var(--header-bg);
.viewsManagerLabel {
flex: 1 1 auto;
color: var(--views-text-color);
text-align: center;
height: fit-content;
width: fit-content;
user-select: none;
font: menu;
font-size: 15px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
#viewsManagerTitle {
display: flex;
flex-direction: row;
align-items: center;
align-self: stretch;
justify-content: space-between;
width: auto;
padding: 12px 16px 12px 8px;
&:not(:has(#viewsManagerHeaderLabel ~ button:not([hidden])))::after {
/* If one of the following buttons is visible, hide the placeholder
button to avoid unnecessary space in the header. */
content: "";
flex: 0 0 auto;
width: 32px;
height: 32px;
pointer-events: none;
}
#viewsManagerSelector {
width: 48px;
height: 32px;
display: block;
> button {
background: var(--button-no-bg);
width: 100%;
height: 100%;
&:focus-visible {
background-color: var(--button-focus-no-bg);
}
&::before {
mask-repeat: no-repeat;
mask-image: var(--views-manager-button-icon);
background-color: var(--button-fg);
}
&::after {
content: "";
display: inline-block;
width: 12px;
height: 12px;
margin-left: 8px;
mask-repeat: no-repeat;
mask-position: center;
mask-image: var(--views-manager-button-arrow-icon);
background-color: var(--button-fg);
}
&:hover {
&::before,
&::after {
background-color: var(--button-hover-fg) !important;
}
}
&:active {
&::before,
&::after {
background-color: var(--button-active-fg) !important;
}
}
}
> .popupMenu {
min-width: 182px;
z-index: 1;
> button {
&#thumbnailsViewMenu::before {
mask-image: var(--menuitem-thumbnailsView-icon);
}
&#outlinesViewMenu::before {
mask-image: var(--menuitem-outlinesView-icon);
}
&#attachmentsViewMenu::before {
mask-image: var(--menuitem-attachmentsView-icon);
}
&#layersViewMenu::before {
mask-image: var(--menuitem-layersView-icon);
}
}
}
}
#viewsManagerAddFileButton {
background: var(--button-no-bg);
width: 32px;
height: 32px;
&:focus-visible {
background-color: var(--button-focus-no-bg);
}
&::before {
mask-repeat: no-repeat;
mask-image: var(--views-manager-add-file-button-icon);
background-color: var(--button-fg);
}
> input {
display: none;
}
}
#viewsManagerCurrentOutlineButton {
background: var(--button-no-bg);
width: 32px;
height: 32px;
&:focus-visible {
background-color: var(--button-focus-no-bg);
}
&::before {
mask-repeat: no-repeat;
mask-image: var(--current-outline-button-icon);
background-color: var(--button-fg);
}
}
}
#viewsManagerStatus {
display: grid;
width: 100%;
border: 1px solid var(--status-border-color);
> div {
min-height: 64px;
width: 100%;
padding-inline: 16px;
grid-area: 1 / 1;
box-sizing: border-box;
&.hidden {
visibility: hidden;
display: unset !important;
}
}
.viewsManagerStatusLabel {
display: flex;
align-items: center;
gap: 8px;
font: menu;
font-size: 13px;
}
#viewsManagerStatusAction {
display: flex;
justify-content: space-between;
align-items: center;
align-self: stretch;
background-color: var(--status-actions-bg);
#viewsManagerStatusActionLabelContainer > button {
position: relative;
width: var(--icon-size);
height: var(--icon-size);
border: none;
padding: 0;
flex: 0 0 auto;
&::before {
content: "";
position: absolute;
inset: 0;
mask-repeat: no-repeat;
mask-position: center;
background-color: var(--indicator-color);
mask-image: var(--pages-selected-icon);
}
@media screen and (forced-colors: active) {
border-radius: 2px;
background-color: var(--button-bg);
&::before {
background-color: var(--button-fg);
}
&:hover {
background-color: var(--button-hover-bg);
&::before {
background-color: var(--button-hover-fg);
}
}
&:active {
background-color: var(--button-active-bg);
&::before {
background-color: var(--button-active-fg);
}
}
}
&#viewsManagerStatusActionDeselectButton:focus-visible {
outline: 2px solid var(--button-focus-outline-color);
border: 1px solid var(--button-focus-border-color);
border-radius: 2px;
outline-offset: 1px;
}
}
#actionSelector {
height: 32px;
min-width: 115px;
width: auto;
display: block;
#viewsManagerStatusActionButton {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 100%;
height: 100%;
padding: 4px 16px;
&::after {
content: "";
display: inline-block;
width: var(--icon-size);
height: var(--icon-size);
mask-repeat: no-repeat;
mask-position: center;
mask-image: var(--manage-button-icon);
background-color: var(--button-fg);
}
&:hover::after {
background-color: var(--button-hover-fg) !important;
}
&:active::after {
background-color: var(--button-active-fg) !important;
}
}
> .popupMenu {
width: 100%;
min-width: fit-content;
z-index: 1;
}
}
}
#viewsManagerStatusUndo {
display: flex;
justify-content: space-between;
align-items: center;
align-self: stretch;
background-color: var(--status-undo-bg);
> span::before {
content: "";
display: inline-block;
width: var(--icon-size);
height: var(--icon-size);
mask-repeat: no-repeat;
mask-position: center;
mask-image: var(--undo-label-icon);
background-color: var(--indicator-color);
}
> div {
display: flex;
align-items: center;
gap: 8px;
width: auto;
#viewsManagerStatusUndoButton {
width: auto;
min-height: 24px;
padding: 4px 8px;
}
}
}
#viewsManagerStatusWarning {
display: flex;
align-items: center;
justify-content: space-between;
background-color: var(--status-warning-bg);
> span {
align-items: flex-start;
&::before {
content: "";
display: inline-block;
width: var(--icon-size);
height: var(--icon-size);
mask-repeat: no-repeat;
mask-position: center;
background-color: var(--indicator-warning-color);
mask-image: var(--undo-label-icon);
flex: 0 0 auto;
}
}
}
#viewsManagerStatusWaiting {
display: flex;
align-items: center;
justify-content: space-between;
background-color: var(--status-waiting-bg);
> span::before {
content: "";
display: inline-block;
width: var(--icon-size);
height: var(--icon-size);
mask-repeat: no-repeat;
mask-position: center;
background-color: var(--indicator-color);
mask-image: var(--spinner-icon);
flex: 0 0 auto;
}
}
}
}
#viewsManagerContent {
width: 100%;
flex: 1 1 0%;
overflow: auto;
&:has(#thumbnailsView.isDragging) {
overflow-x: hidden;
}
#thumbnailsView {
--thumbnail-width: 126px;
--gap-between-input-and-thumbnail: 16px;
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: space-evenly;
padding: 20px 32px;
gap: 44px;
width: 100%;
box-sizing: border-box;
position: relative;
&.isDragging {
cursor: grabbing;
> .thumbnail {
> .thumbnailImageContainer:hover {
cursor: grabbing;
&:not([aria-current="page"]) {
box-shadow: var(--image-shadow);
}
}
> input {
pointer-events: none;
}
}
}
&.isDragging > .dragMarker,
&.isDraggingFile > .dragMarker {
position: absolute;
top: 0;
left: 0;
border: 2px solid var(--indicator-color);
contain: strict;
}
&.pasteMode {
gap: var(--gap-between-input-and-thumbnail);
> .thumbnail {
flex-direction: column;
> input {
display: none;
}
> .thumbnailPasteButton {
display: flex;
justify-content: center;
align-items: center;
border-radius: 16px;
min-height: 24px;
padding: 4px 16px;
font: menu;
font-size: 13px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
}
}
&:not(.pasteMode) > .thumbnail > .thumbnailPasteButton {
display: none;
}
> .thumbnail {
--input-dim: 16px;
&:not(&:has(input)) {
--input-dim: 0px;
--gap-between-input-and-thumbnail: 0px;
}
display: inline-flex;
justify-content: flex-end;
align-items: center;
flex-direction: row-reverse;
gap: var(--gap-between-input-and-thumbnail);
width: calc(
var(--thumbnail-width) + 2 *
(var(--input-dim) + var(--gap-between-input-and-thumbnail))
);
height: auto;
position: relative;
scroll-margin-top: 20px;
.thumbnailPasteButton {
padding: 8px 0;
text-align: center;
}
&:not(.isDragging) > .thumbnailImageContainer::after {
content: attr(page-number);
border-radius: 8px;
border: 1px solid var(--image-page-number-border-color);
background-color: var(--image-page-number-bg);
color: var(--image-page-number-fg);
position: absolute;
bottom: 5px;
inset-inline-end: 50%;
min-width: 32px;
height: 16px;
text-align: center;
box-sizing: content-box;
translate: calc(var(--dir-factor) * 50%);
font: menu;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
pointer-events: none;
user-select: none;
}
&:has([aria-current="page"]):not(.isDragging)
> .thumbnailImageContainer::after {
background-color: var(--image-current-page-number-bg);
color: var(--image-current-page-number-fg);
outline: 1px solid var(--image-current-border-color);
}
&.isDragging > input {
visibility: hidden;
}
> input {
margin: 0;
width: var(--input-dim);
height: var(--input-dim);
accent-color: var(--indicator-color);
}
> .thumbnailImageContainer {
--thumbnail-dragging-scale: 1.4;
width: var(--thumbnail-width);
border: none;
border-radius: 8px;
box-shadow: var(--image-shadow);
box-sizing: content-box;
outline: var(--image-outline);
user-select: none;
position: relative;
img {
width: 100%;
height: 100%;
border: none;
border-radius: 8px;
outline: none;
user-select: none;
pointer-events: none;
}
&.missingThumbnailImage {
content-visibility: hidden;
}
&:hover {
cursor: pointer;
box-shadow: var(--image-hover-shadow);
&::after {
background-color: var(--image-hover-page-number-bg);
color: var(--image-hover-page-number-fg);
}
@media screen and (forced-colors: active) {
/* box-shadow isn't rendered in HCM */
box-shadow: none;
outline: var(--image-border-width) var(--image-hover-border-color)
solid;
}
}
&:focus-visible {
&:not([aria-current="page"]) {
box-shadow: var(--image-hover-shadow);
outline: none;
@media screen and (forced-colors: active) {
/* box-shadow isn't rendered in HCM */
box-shadow: none;
outline: var(--image-border-width)
var(--image-focus-outline-color) solid;
}
}
&[aria-current="page"] {
outline: var(--image-border-width) solid
var(--image-current-focused-outline-color);
outline-offset: var(--image-border-width);
@media screen and (forced-colors: active) {
/* box-shadow isn't rendered in HCM */
box-shadow: none;
outline: var(--image-border-width)
var(--image-current-border-color) solid;
outline-offset: 0;
> img {
outline: var(--image-border-width)
var(--image-focus-outline-color) solid;
outline-offset: var(--image-border-width);
}
}
}
@media screen and (forced-colors: active) {
/* box-shadow isn't rendered in HCM */
box-shadow: none;
outline: var(--image-border-width)
var(--image-current-border-color) solid;
&:hover > img {
outline: var(--image-border-width)
var(--image-hover-border-color) solid;
outline-offset: var(--image-border-width);
}
}
}
&[aria-current="page"] {
box-shadow: var(--image-current-shadow);
&:hover::after {
background-color: var(--image-current-hover-page-number-bg);
color: var(--image-current-hover-page-number-fg);
}
@media screen and (forced-colors: active) {
/* box-shadow isn't rendered in HCM */
box-shadow: none;
outline: var(--image-border-width)
var(--image-current-border-color) solid;
&:hover > img {
outline: var(--image-border-width)
var(--image-hover-border-color) solid;
outline-offset: var(--image-border-width);
}
}
}
&.placeholder {
background-color: var(--image-dragging-placeholder-bg);
box-shadow: none !important;
outline: var(--image-dragging-placeholder-border);
}
&.draggingThumbnail {
position: absolute;
left: 0;
top: 0;
z-index: 1;
transform-origin: 0 0 0;
scale: calc(1 / var(--thumbnail-dragging-scale));
pointer-events: none;
box-shadow: var(--image-dragging-shadow);
&.multiple {
box-shadow: var(--image-multiple-dragging-shadow);
@media screen and (forced-colors: active) {
forced-color-adjust: none;
box-shadow: var(--image-multiple-dragging-shadow);
}
> .thumbnailImageContainer {
position: absolute;
top: 0;
left: 0;
width: var(--thumbnail-width);
border: none;
border-radius: 8px;
box-sizing: content-box;
outline: none;
user-select: none;
}
&::after {
content: attr(data-multiple-count);
border-radius: calc(8px * var(--thumbnail-dragging-scale));
background-color: var(--multiple-dragging-indicator-bg);
color: var(--multiple-dragging-text-color);
position: absolute;
inset-block-end: calc(4px * var(--thumbnail-dragging-scale));
inset-inline-start: calc(4px * var(--thumbnail-dragging-scale));
min-width: calc(32px * var(--thumbnail-dragging-scale));
height: calc(16px * var(--thumbnail-dragging-scale));
text-align: center;
font: menu;
font-size: calc(13px * var(--thumbnail-dragging-scale));
font-style: normal;
font-weight: 400;
line-height: normal;
contain: strict;
}
}
}
}
}
}
#attachmentsView {
--attachment-color: light-dark(rgb(0 0 0 / 0.8), rgb(255 255 255 / 0.8));
--attachment-bg-color: light-dark(
rgb(0 0 0 / 0.15),
rgb(255 255 255 / 0.15)
);
--attachment-hover-color: light-dark(
rgb(0 0 0 / 0.9),
rgb(255 255 255 / 0.9)
);
> ul {
list-style-type: none;
padding: 0;
> li > a {
text-decoration: none;
display: inline-block;
/* Subtract the right padding (left, in RTL mode) of the container: */
min-width: calc(100% - 4px);
height: auto;
margin-bottom: 1px;
padding: 2px 0 5px;
padding-inline-start: 4px;
border-radius: 2px;
color: var(--attachment-color);
font-size: 13px;
line-height: 15px;
user-select: none;
white-space: normal;
cursor: pointer;
&:hover {
background-color: var(--attachment-bg-color);
background-clip: padding-box;
border-radius: 2px;
color: var(--attachment-hover-color);
}
}
}
}
}
}