/* 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. */ #commentManagerDialog { --comment-actions-button-icon: url(images/comment-actionsButton.svg); --comment-close-button-icon: url(images/comment-closeButton.svg); --default-dialog-bg-color: #ffff98; --dialog-base-color: var(--default-dialog-bg-color); --dialog-bg-color: color-mix(in srgb, var(--dialog-base-color), white 30%); --dialog-border-color: var(--dialog-base-color); --menuitem-bg-color: transparent; --menuitem-fg-color: black; --menuitem-hover-bg-color: #3383e7; --menuitem-hover-fg-color: white; --comment-text-input-bg: white; --comment-text-input-fg: black; --comment-text-input-border: #0060df; --comment-focus-outline-color: #0060df; --hover-filter: brightness(0.9); --text-primary-color: #15141a; --button-secondary-bg-color: #f0f0f4; --button-secondary-active-bg-color: color-mix( in srgb, var(--button-secondary-bg-color), black 14% ); --button-secondary-hover-bg-color: color-mix( in srgb, var(--button-secondary-bg-color), black 7% ); --button-primary-bg-color: #0060df; --button-primary-fg-color: #fbfbfe; --button-primary-active-bg-color: #0050c0; --button-primary-hover-bg-color: #0250bb; --menu-bg-color: rgb(253 250 244); --menu-button-border-color: transparent; --menu-button-focus-outline-color: var(--comment-text-input-border); @media screen and (forced-colors: active) { --hover-filter: none; --text-primary-color: CanvasText; --button-secondary-bg-color: HighlightText; --button-secondary-active-bg-color: HighlightText; --button-secondary-hover-bg-color: HighlightText; --button-primary-bg-color: ButtonText; --button-primary-fg-color: HighlightText; --button-primary-active-bg-color: SelectedItem; --button-primary-hover-bg-color: SelectedItem; --menu-button-border-color: Canvas; --menu-button-focus-outline-color: CanvasText; } width: 308px; padding: 8px 16px 16px; overflow: visible; position: absolute; margin: 0; border-radius: 4px; border: 1px solid var(--dialog-border-color); background: var(--dialog-bg-color); box-shadow: 0 2px 14px 0 rgb(58 57 68 / 0.2); .mainContainer { width: 100%; height: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; *:focus-visible { outline: 2px solid var(--comment-focus-outline-color); outline-offset: 0; } #commentManagerToolbar { width: 100%; display: flex; justify-content: flex-end; align-items: flex-start; gap: 8px; align-self: stretch; cursor: move; > button { color-scheme: light; width: 24px; height: 24px; padding: 0; border: none; cursor: pointer; &::before { content: ""; display: inline-block; width: 100%; height: 100%; mask-repeat: no-repeat; mask-position: center; } &#commentActionsButton::before { mask-image: var(--comment-actions-button-icon); } &#commentCloseButton::before { mask-image: var(--comment-close-button-icon); } > span { display: inline-block; width: 0; height: 0; overflow: hidden; } } menu { width: max-content; min-width: 90px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 6px; cursor: auto; z-index: 1; margin: 0; position: absolute; top: 8px; right: -6.5px; border-radius: 6px; border: 0.5px solid #b4b4b6; background-color: var(--menu-bg-color); box-shadow: 1px -1px 0 0 #fff inset, -1px 1px 0 0 #fff inset, -1px -1px 0 0 #fff inset, 1px 1px 0 0 #fff inset, 0 0 15px 0 rgb(0 0 0 / 0.25); button { background-color: var(--menuitem-bg-color); width: 100%; height: 24px; padding: 0; box-sizing: border-box; display: flex; border: 2px solid var(--menu-button-border-color); color: var(--menuitem-fg-color); &:hover { background-color: var(--menuitem-hover-bg-color); color: var(--menuitem-hover-fg-color); } &:is(:focus-visible, :focus) { outline: none; border: 2px solid var(--menu-button-focus-outline-color); } &:disabled { opacity: 0.5; pointer-events: none; } span { align-content: center; width: 100%; max-width: min-content; padding-inline: 8px; color: inherit; text-align: start; font: menu; font-size: 15px; font-weight: 400; line-height: normal; } } } } #commentManagerTextInput { width: 100%; min-height: 132px; resize: none; box-sizing: border-box; margin-bottom: 12px; border-radius: 4px; border: 2px solid var(--comment-text-input-border); background-color: var(--comment-text-input-bg); color: var(--comment-text-input-fg); } #commentManagerTextView { width: 100%; height: max-content; resize: none; box-sizing: border-box; margin-bottom: 12px; border: none; background-color: transparent; color: var(--comment-text-input-fg); } .dialogButtonsGroup { gap: 8px; #commentManagerSaveButton:disabled { background-color: color-mix( in srgb, var(--button-primary-disabled-bg-color), transparent 50% ); border-color: color-mix( in srgb, var(--button-primary-disabled-border-color), transparent 50% ); opacity: 1; } } } } .annotationLayer.disabled .annotationCommentButton { display: none; } :is(.annotationLayer, .annotationEditorLayer) { .annotationCommentButton { --comment-button-bg: light-dark(white, #1c1b22); --comment-button-fg: light-dark(#5b5b66, #fbfbfe); --comment-button-active-bg: light-dark(#0041a4, #a6ecf4); --comment-button-active-fg: light-dark(white, #15141a); --comment-button-hover-bg: light-dark(#0053cb, #61dce9); --comment-button-hover-fg: light-dark(white, #15141a); --comment-button-border-color: light-dark(#8f8f9d, #bfbfc9); --comment-button-focus-border-color: light-dark(#cfcfd8, #3a3944); --comment-button-hover-border-color: var(--comment-button-hover-bg); --comment-button-selected-bg: light-dark(#0062fa, #00cadb); --comment-button-selected-fg: light-dark(white, #15141a); --comment-button-dim: 24px; --comment-button-offset: 1px; --comment-button-box-shadow: 0 0.25px 0.75px 0 light-dark(rgb(0 0 0 / 0.05), rgb(0 0 0 / 0.2)), 0 2px 6px 0 light-dark(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.4)); --comment-button-focus-outline-color: light-dark(#0062fa, #00cadb); @media screen and (forced-colors: active) { --comment-button-bg: Canvas; --comment-button-fg: CanvasText; --comment-button-hover-bg: Highlight; --comment-button-hover-fg: ButtonFace; --comment-button-active-bg: Highlight; --comment-button-active-fg: ButtonFace; --comment-button-border-color: ButtonBorder; --comment-button-box-shadow: none; --comment-button-focus-outline-color: CanvasText; --comment-button-selected-bg: ButtonBorder; --comment-button-selected-fg: ButtonFace; } position: absolute; width: var(--comment-button-dim); height: var(--comment-button-dim); background-color: var(--comment-button-bg); border-radius: 6px 6px 6px 0; border: 1px solid var(--comment-button-border-color); box-shadow: var(--comment-button-box-shadow); cursor: auto; z-index: 1; padding: 4px; margin: 0; box-sizing: border-box; pointer-events: auto; &::before { content: ""; display: inline-block; width: 100%; height: 100%; mask-repeat: no-repeat; mask-size: cover; mask-image: var(--comment-edit-button-icon); background-color: var(--comment-button-fg); margin: 0; padding: 0; } &:focus-visible { -moz-outline-radius: 7px 7px 7px 0; outline: 2px solid var(--comment-button-focus-outline-color); outline-offset: 1px; border-color: var(--comment-button-focus-border-color); } &:hover { background-color: var(--comment-button-hover-bg) !important; &::before { background-color: var(--comment-button-hover-fg); } } &:active { background-color: var(--comment-button-active-bg) !important; &::before { background-color: var(--comment-button-active-fg); } } &.selected { background-color: var(--comment-button-selected-bg) !important; &::before { background-color: var(--comment-button-selected-fg); } } } }