2022-06-01 17:38:08 +09:00
|
|
|
/* Copyright 2022 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.
|
|
|
|
*/
|
|
|
|
|
2023-11-23 03:02:42 +09:00
|
|
|
@import url(draw_layer_builder.css);
|
|
|
|
|
2022-06-01 17:38:08 +09:00
|
|
|
:root {
|
2023-07-24 16:49:49 +09:00
|
|
|
--outline-width: 2px;
|
2023-09-13 04:29:20 +09:00
|
|
|
--outline-color: #0060df;
|
|
|
|
--outline-around-width: 1px;
|
|
|
|
--outline-around-color: #f0f0f4;
|
2023-09-21 01:12:12 +09:00
|
|
|
--hover-outline-around-color: var(--outline-around-color);
|
2023-07-24 16:49:49 +09:00
|
|
|
--focus-outline: solid var(--outline-width) var(--outline-color);
|
2023-09-13 04:29:20 +09:00
|
|
|
--unfocus-outline: solid var(--outline-width) transparent;
|
|
|
|
--focus-outline-around: solid var(--outline-around-width)
|
|
|
|
var(--outline-around-color);
|
2023-09-21 01:12:12 +09:00
|
|
|
--hover-outline-color: #8f8f9d;
|
|
|
|
--hover-outline: solid var(--outline-width) var(--hover-outline-color);
|
|
|
|
--hover-outline-around: solid var(--outline-around-width)
|
|
|
|
var(--hover-outline-around-color);
|
2022-06-01 22:42:46 +09:00
|
|
|
--freetext-line-height: 1.35;
|
|
|
|
--freetext-padding: 2px;
|
2023-09-15 17:29:49 +09:00
|
|
|
--resizer-bg-color: var(--outline-color);
|
2023-09-13 04:29:20 +09:00
|
|
|
--resizer-size: 6px;
|
2023-07-24 16:49:49 +09:00
|
|
|
--resizer-shift: calc(
|
2023-09-13 04:29:20 +09:00
|
|
|
0px - (var(--outline-width) + var(--resizer-size)) / 2 -
|
|
|
|
var(--outline-around-width)
|
2023-07-24 16:49:49 +09:00
|
|
|
);
|
2022-10-27 18:49:03 +09:00
|
|
|
--editorFreeText-editing-cursor: text;
|
2022-08-02 17:26:46 +09:00
|
|
|
/*#if COMPONENTS*/
|
|
|
|
--editorInk-editing-cursor: pointer;
|
|
|
|
/*#else*/
|
2022-10-27 18:49:03 +09:00
|
|
|
--editorInk-editing-cursor: url(images/cursor-editorInk.svg) 0 16, pointer;
|
2022-08-02 17:26:46 +09:00
|
|
|
/*#endif*/
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
2022-11-22 03:43:12 +09:00
|
|
|
@media (min-resolution: 1.1dppx) {
|
|
|
|
:root {
|
|
|
|
/*#if !COMPONENTS*/
|
|
|
|
--editorFreeText-editing-cursor: url(images/cursor-editorFreeText.svg) 0 16,
|
|
|
|
text;
|
|
|
|
/*#endif*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-18 18:49:52 +09:00
|
|
|
@media screen and (forced-colors: active) {
|
2022-06-29 22:39:02 +09:00
|
|
|
:root {
|
2023-09-15 17:29:49 +09:00
|
|
|
--outline-color: CanvasText;
|
2023-09-13 04:29:20 +09:00
|
|
|
--outline-around-color: ButtonFace;
|
2023-09-15 17:29:49 +09:00
|
|
|
--resizer-bg-color: ButtonText;
|
2023-09-21 01:12:12 +09:00
|
|
|
--hover-outline-color: Highlight;
|
|
|
|
--hover-outline-around-color: SelectedItemText;
|
2022-06-29 22:39:02 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-23 22:47:45 +09:00
|
|
|
[data-editor-rotation="90"] {
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
2023-11-24 22:05:29 +09:00
|
|
|
|
2022-06-23 22:47:45 +09:00
|
|
|
[data-editor-rotation="180"] {
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
2023-11-24 22:05:29 +09:00
|
|
|
|
2022-06-23 22:47:45 +09:00
|
|
|
[data-editor-rotation="270"] {
|
|
|
|
transform: rotate(270deg);
|
|
|
|
}
|
|
|
|
|
2022-06-01 17:38:08 +09:00
|
|
|
.annotationEditorLayer {
|
|
|
|
background: transparent;
|
|
|
|
position: absolute;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-13 18:01:55 +09:00
|
|
|
font-size: calc(100px * var(--scale-factor));
|
2022-06-23 22:47:45 +09:00
|
|
|
transform-origin: 0 0;
|
2022-09-02 21:42:35 +09:00
|
|
|
cursor: auto;
|
2022-12-23 05:55:25 +09:00
|
|
|
z-index: 4;
|
2022-09-02 21:42:35 +09:00
|
|
|
}
|
|
|
|
|
2023-08-11 21:15:15 +09:00
|
|
|
.annotationEditorLayer.waiting {
|
|
|
|
content: "";
|
|
|
|
cursor: wait;
|
|
|
|
position: absolute;
|
|
|
|
inset: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2023-09-28 22:09:50 +09:00
|
|
|
.annotationEditorLayer.disabled {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2023-09-25 21:57:34 +09:00
|
|
|
.annotationEditorLayer.freetextEditing {
|
2022-10-27 18:49:03 +09:00
|
|
|
cursor: var(--editorFreeText-editing-cursor);
|
2022-09-02 21:42:35 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer.inkEditing {
|
2022-10-27 18:49:03 +09:00
|
|
|
cursor: var(--editorInk-editing-cursor);
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
2023-06-22 19:16:07 +09:00
|
|
|
.annotationEditorLayer :is(.freeTextEditor, .inkEditor, .stampEditor) {
|
2022-06-01 17:38:08 +09:00
|
|
|
position: absolute;
|
|
|
|
background: transparent;
|
2023-06-22 19:16:07 +09:00
|
|
|
z-index: 1;
|
|
|
|
transform-origin: 0 0;
|
|
|
|
cursor: auto;
|
2023-07-14 01:31:08 +09:00
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
2023-09-13 04:29:20 +09:00
|
|
|
border: var(--unfocus-outline);
|
|
|
|
|
|
|
|
&.draggable.selectedEditor {
|
|
|
|
cursor: move;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.selectedEditor {
|
|
|
|
border: var(--focus-outline);
|
|
|
|
outline: var(--focus-outline-around);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
/*
|
|
|
|
This is a workaround for the lack of support for stripes(...) (see
|
|
|
|
https://drafts.csswg.org/css-images-4/#stripes).
|
|
|
|
The outline should be composed of 1px white, 2px blue and 1px white.
|
|
|
|
This could be achieved in different ways:
|
|
|
|
- using a linear-gradient;
|
|
|
|
- using a box-shadow;
|
|
|
|
- using an outline on the selected element and an outline+border on
|
|
|
|
the ::before pseudo-element.
|
|
|
|
All these options lead to incorrect rendering likely due to rounding
|
|
|
|
issues.
|
|
|
|
That said it doesn't mean that the current is ideal, but it's the best
|
|
|
|
we could come up with for the moment.
|
|
|
|
One drawback of this approach is that we use a border on the selected
|
|
|
|
element which means that we must take care of it when positioning the
|
|
|
|
div in js (see AnnotationEditor._borderLineWidth in editor.js).
|
|
|
|
*/
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
inset: 0;
|
|
|
|
border: var(--focus-outline-around);
|
2023-09-24 06:53:19 +09:00
|
|
|
pointer-events: none;
|
2023-09-13 04:29:20 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover:not(.selectedEditor) {
|
|
|
|
border: var(--hover-outline);
|
2023-09-21 01:12:12 +09:00
|
|
|
outline: var(--hover-outline-around);
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
inset: 0;
|
|
|
|
border: var(--focus-outline-around);
|
|
|
|
}
|
2023-09-13 04:29:20 +09:00
|
|
|
}
|
2023-11-23 03:02:42 +09:00
|
|
|
}
|
2023-11-09 02:13:15 +09:00
|
|
|
|
2023-11-23 03:02:42 +09:00
|
|
|
.annotationEditorLayer
|
|
|
|
:is(.freeTextEditor, .inkEditor, .stampEditor, .highlightEditor) {
|
2023-11-09 02:13:15 +09:00
|
|
|
.editToolbar {
|
|
|
|
--editor-toolbar-delete-image: url(images/editor-toolbar-delete.svg);
|
|
|
|
--editor-toolbar-bg-color: #f0f0f4;
|
|
|
|
--editor-toolbar-fg-color: #2e2e56;
|
|
|
|
--editor-toolbar-border-color: #8f8f9d;
|
|
|
|
--editor-toolbar-hover-bg-color: #e0e0e6;
|
|
|
|
--editor-toolbar-active-bg-color: #cfcfd8;
|
|
|
|
--editor-toolbar-focus-outline-color: #0060df;
|
|
|
|
--editor-toolbar-shadow: 0 2px 6px 0 rgb(58 57 68 / 0.2);
|
2023-11-23 03:02:42 +09:00
|
|
|
--editor-toolbar-vert-offset: 6px;
|
2023-11-24 22:05:29 +09:00
|
|
|
--editor-toolbar-height: 28px;
|
|
|
|
--editor-toolbar-padding: 2px;
|
2023-11-09 02:13:15 +09:00
|
|
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
--editor-toolbar-bg-color: #2b2a33;
|
|
|
|
--editor-toolbar-fg-color: #fbfbfe;
|
|
|
|
--editor-toolbar-hover-bg-color: #52525e;
|
|
|
|
--editor-toolbar-active-bg-color: #5b5b66;
|
|
|
|
--editor-toolbar-focus-outline-color: #0df;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (forced-colors: active) {
|
|
|
|
--editor-toolbar-bg-color: ButtonFace;
|
|
|
|
--editor-toolbar-fg-color: ButtonText;
|
|
|
|
--editor-toolbar-border-color: ButtonText;
|
|
|
|
--editor-toolbar-hover-bg-color: AccentColor;
|
|
|
|
--editor-toolbar-active-bg-color: ButtonFace;
|
|
|
|
--editor-toolbar-focus-outline-color: ButtonBorder;
|
|
|
|
--editor-toolbar-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
width: fit-content;
|
2023-11-24 22:05:29 +09:00
|
|
|
height: var(--editor-toolbar-height);
|
2023-11-09 02:13:15 +09:00
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
cursor: default;
|
2023-11-23 03:02:42 +09:00
|
|
|
pointer-events: auto;
|
2023-11-24 22:05:29 +09:00
|
|
|
box-sizing: content-box;
|
|
|
|
padding: var(--editor-toolbar-padding);
|
2023-11-09 02:13:15 +09:00
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
inset-inline-end: 0;
|
2023-11-23 03:02:42 +09:00
|
|
|
inset-block-start: calc(100% + var(--editor-toolbar-vert-offset));
|
2023-11-09 02:13:15 +09:00
|
|
|
|
2023-11-24 22:05:29 +09:00
|
|
|
border-radius: 6px;
|
2023-11-09 02:13:15 +09:00
|
|
|
background-color: var(--editor-toolbar-bg-color);
|
|
|
|
border: 1px solid var(--editor-toolbar-border-color);
|
|
|
|
box-shadow: var(--editor-toolbar-shadow);
|
|
|
|
|
|
|
|
&.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:has(:focus-visible) {
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
|
|
|
|
2023-11-24 22:05:29 +09:00
|
|
|
&:dir(ltr) {
|
|
|
|
transform-origin: 100% 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:dir(rtl) {
|
|
|
|
transform-origin: 0 0;
|
|
|
|
}
|
|
|
|
|
2023-11-09 02:13:15 +09:00
|
|
|
.buttons {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2023-11-24 22:05:29 +09:00
|
|
|
gap: 0;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
.divider {
|
|
|
|
width: 1px;
|
|
|
|
height: calc(
|
|
|
|
2 * var(--editor-toolbar-padding) + var(--editor-toolbar-height)
|
|
|
|
);
|
|
|
|
background-color: var(--editor-toolbar-border-color);
|
|
|
|
display: inline-block;
|
|
|
|
margin-inline: 2px;
|
|
|
|
}
|
2023-11-09 02:13:15 +09:00
|
|
|
|
|
|
|
.delete {
|
2023-11-24 22:05:29 +09:00
|
|
|
width: var(--editor-toolbar-height);
|
2023-11-09 02:13:15 +09:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
mask-image: var(--editor-toolbar-delete-image);
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-position: center;
|
|
|
|
display: inline-block;
|
|
|
|
background-color: var(--editor-toolbar-fg-color);
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> * {
|
2023-11-24 22:05:29 +09:00
|
|
|
height: var(--editor-toolbar-height);
|
|
|
|
}
|
|
|
|
|
|
|
|
> :not(.divider) {
|
|
|
|
border: none;
|
|
|
|
background-color: transparent;
|
|
|
|
cursor: pointer;
|
|
|
|
|
2023-11-09 02:13:15 +09:00
|
|
|
&:hover {
|
|
|
|
border-radius: 2px;
|
|
|
|
background-color: var(--editor-toolbar-hover-bg-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
border-radius: 2px;
|
|
|
|
background-color: var(--editor-toolbar-active-bg-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus-visible {
|
2023-11-24 22:05:29 +09:00
|
|
|
border-radius: 2px;
|
2023-11-09 02:13:15 +09:00
|
|
|
outline: 2px solid var(--editor-toolbar-focus-outline-color);
|
|
|
|
}
|
|
|
|
}
|
2023-11-24 22:05:29 +09:00
|
|
|
|
|
|
|
.altText {
|
|
|
|
--alt-text-add-image: url(images/altText_add.svg);
|
|
|
|
--alt-text-done-image: url(images/altText_done.svg);
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
width: max-content;
|
|
|
|
padding-inline: 8px;
|
|
|
|
pointer-events: all;
|
|
|
|
font: menu;
|
|
|
|
font-weight: 590;
|
|
|
|
font-size: 12px;
|
|
|
|
color: var(--editor-toolbar-fg-color);
|
|
|
|
|
|
|
|
&:disabled {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
mask-image: var(--alt-text-add-image);
|
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-position: center;
|
|
|
|
display: inline-block;
|
|
|
|
width: 12px;
|
|
|
|
height: 13px;
|
|
|
|
background-color: var(--editor-toolbar-fg-color);
|
|
|
|
margin-inline-end: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.done::before {
|
|
|
|
mask-image: var(--alt-text-done-image);
|
|
|
|
}
|
|
|
|
|
|
|
|
.tooltip {
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
&.show {
|
|
|
|
--alt-text-tooltip-bg: #f0f0f4;
|
|
|
|
--alt-text-tooltip-fg: #15141a;
|
|
|
|
--alt-text-tooltip-border: #8f8f9d;
|
|
|
|
--alt-text-tooltip-shadow: 0px 2px 6px 0px rgb(58 57 68 / 0.2);
|
|
|
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
--alt-text-tooltip-bg: #1c1b22;
|
|
|
|
--alt-text-tooltip-fg: #fbfbfe;
|
|
|
|
--alt-text-tooltip-shadow: 0px 2px 6px 0px #15141a;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (forced-colors: active) {
|
|
|
|
--alt-text-tooltip-bg: Canvas;
|
|
|
|
--alt-text-tooltip-fg: CanvasText;
|
|
|
|
--alt-text-tooltip-border: CanvasText;
|
|
|
|
--alt-text-tooltip-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
position: absolute;
|
|
|
|
top: calc(100% + 2px);
|
|
|
|
inset-inline-start: 0;
|
|
|
|
padding-block: 2px 3px;
|
|
|
|
padding-inline: 3px;
|
|
|
|
max-width: 300px;
|
|
|
|
width: max-content;
|
|
|
|
height: auto;
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
|
|
border: 0.5px solid var(--alt-text-tooltip-border);
|
|
|
|
background: var(--alt-text-tooltip-bg);
|
|
|
|
box-shadow: var(--alt-text-tooltip-shadow);
|
|
|
|
color: var(--alt-text-tooltip-fg);
|
|
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-09 02:13:15 +09:00
|
|
|
}
|
|
|
|
}
|
2023-06-22 19:16:07 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor {
|
2022-06-13 18:01:55 +09:00
|
|
|
padding: calc(var(--freetext-padding) * var(--scale-factor));
|
2022-06-01 17:38:08 +09:00
|
|
|
width: auto;
|
|
|
|
height: auto;
|
2022-07-20 01:20:56 +09:00
|
|
|
touch-action: none;
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .internal {
|
|
|
|
background: transparent;
|
|
|
|
border: none;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-01 17:38:08 +09:00
|
|
|
overflow: visible;
|
|
|
|
white-space: nowrap;
|
2022-06-01 22:42:46 +09:00
|
|
|
font: 10px sans-serif;
|
|
|
|
line-height: var(--freetext-line-height);
|
2023-07-25 02:37:56 +09:00
|
|
|
user-select: none;
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .overlay {
|
|
|
|
position: absolute;
|
|
|
|
display: none;
|
|
|
|
background: transparent;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-01 17:38:08 +09:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2023-11-23 03:02:42 +09:00
|
|
|
.annotationEditorLayer freeTextEditor .overlay.enabled {
|
2022-06-01 17:38:08 +09:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .internal:empty::before {
|
|
|
|
content: attr(default-content);
|
|
|
|
color: gray;
|
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .freeTextEditor .internal:focus {
|
|
|
|
outline: none;
|
2023-07-25 02:37:56 +09:00
|
|
|
user-select: auto;
|
2022-06-01 17:38:08 +09:00
|
|
|
}
|
|
|
|
|
2022-06-05 06:28:19 +09:00
|
|
|
.annotationEditorLayer .inkEditor {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2022-06-17 01:16:49 +09:00
|
|
|
}
|
|
|
|
|
2022-06-05 06:28:19 +09:00
|
|
|
.annotationEditorLayer .inkEditor.editing {
|
2022-09-02 21:42:35 +09:00
|
|
|
cursor: inherit;
|
2022-06-05 06:28:19 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.annotationEditorLayer .inkEditor .inkEditorCanvas {
|
|
|
|
position: absolute;
|
2023-07-25 22:05:35 +09:00
|
|
|
inset: 0;
|
2022-06-05 06:28:19 +09:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2022-07-20 01:20:56 +09:00
|
|
|
touch-action: none;
|
2022-06-05 06:28:19 +09:00
|
|
|
}
|
2023-06-22 19:16:07 +09:00
|
|
|
|
|
|
|
.annotationEditorLayer .stampEditor {
|
|
|
|
width: auto;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
2023-07-24 16:49:49 +09:00
|
|
|
.annotationEditorLayer .stampEditor canvas {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2023-06-22 19:16:07 +09:00
|
|
|
}
|
|
|
|
|
2023-08-05 01:21:27 +09:00
|
|
|
.annotationEditorLayer {
|
|
|
|
:is(.freeTextEditor, .inkEditor, .stampEditor) {
|
|
|
|
& > .resizers {
|
|
|
|
position: absolute;
|
|
|
|
inset: 0;
|
|
|
|
|
|
|
|
&.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
& > .resizer {
|
|
|
|
width: var(--resizer-size);
|
|
|
|
height: var(--resizer-size);
|
2023-09-21 20:55:54 +09:00
|
|
|
background: content-box var(--resizer-bg-color);
|
2023-09-13 04:29:20 +09:00
|
|
|
border: var(--focus-outline-around);
|
2023-09-19 16:56:54 +09:00
|
|
|
border-radius: 2px;
|
2023-08-05 01:21:27 +09:00
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
&.topLeft {
|
|
|
|
top: var(--resizer-shift);
|
|
|
|
left: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.topMiddle {
|
|
|
|
top: var(--resizer-shift);
|
|
|
|
left: calc(50% + var(--resizer-shift));
|
|
|
|
}
|
|
|
|
|
|
|
|
&.topRight {
|
|
|
|
top: var(--resizer-shift);
|
|
|
|
right: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.middleRight {
|
|
|
|
top: calc(50% + var(--resizer-shift));
|
|
|
|
right: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.bottomRight {
|
|
|
|
bottom: var(--resizer-shift);
|
|
|
|
right: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.bottomMiddle {
|
|
|
|
bottom: var(--resizer-shift);
|
|
|
|
left: calc(50% + var(--resizer-shift));
|
|
|
|
}
|
|
|
|
|
|
|
|
&.bottomLeft {
|
|
|
|
bottom: var(--resizer-shift);
|
|
|
|
left: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.middleLeft {
|
|
|
|
top: calc(50% + var(--resizer-shift));
|
|
|
|
left: var(--resizer-shift);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-24 16:49:49 +09:00
|
|
|
|
2023-08-05 01:21:27 +09:00
|
|
|
&[data-main-rotation="0"]
|
|
|
|
:is([data-editor-rotation="0"], [data-editor-rotation="180"]),
|
|
|
|
&[data-main-rotation="90"]
|
|
|
|
:is([data-editor-rotation="270"], [data-editor-rotation="90"]),
|
|
|
|
&[data-main-rotation="180"]
|
|
|
|
:is([data-editor-rotation="180"], [data-editor-rotation="0"]),
|
|
|
|
&[data-main-rotation="270"]
|
|
|
|
:is([data-editor-rotation="90"], [data-editor-rotation="270"]) {
|
|
|
|
& > .resizers > .resizer {
|
|
|
|
&.topLeft,
|
|
|
|
&.bottomRight {
|
|
|
|
cursor: nwse-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.topMiddle,
|
|
|
|
&.bottomMiddle {
|
|
|
|
cursor: ns-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.topRight,
|
|
|
|
&.bottomLeft {
|
|
|
|
cursor: nesw-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.middleRight,
|
|
|
|
&.middleLeft {
|
|
|
|
cursor: ew-resize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-24 16:49:49 +09:00
|
|
|
|
2023-08-05 01:21:27 +09:00
|
|
|
&[data-main-rotation="0"]
|
|
|
|
:is([data-editor-rotation="90"], [data-editor-rotation="270"]),
|
|
|
|
&[data-main-rotation="90"]
|
|
|
|
:is([data-editor-rotation="0"], [data-editor-rotation="180"]),
|
|
|
|
&[data-main-rotation="180"]
|
|
|
|
:is([data-editor-rotation="270"], [data-editor-rotation="90"]),
|
|
|
|
&[data-main-rotation="270"]
|
|
|
|
:is([data-editor-rotation="180"], [data-editor-rotation="0"]) {
|
|
|
|
& > .resizers > .resizer {
|
|
|
|
&.topLeft,
|
|
|
|
&.bottomRight {
|
|
|
|
cursor: nesw-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.topMiddle,
|
|
|
|
&.bottomMiddle {
|
|
|
|
cursor: ew-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.topRight,
|
|
|
|
&.bottomLeft {
|
|
|
|
cursor: nwse-resize;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.middleRight,
|
|
|
|
&.middleLeft {
|
|
|
|
cursor: ns-resize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-09-15 23:32:16 +09:00
|
|
|
|
|
|
|
&
|
|
|
|
:is(
|
|
|
|
[data-main-rotation="0"] [data-editor-rotation="90"],
|
|
|
|
[data-main-rotation="90"] [data-editor-rotation="0"],
|
|
|
|
[data-main-rotation="180"] [data-editor-rotation="270"],
|
2023-09-19 01:45:14 +09:00
|
|
|
[data-main-rotation="270"] [data-editor-rotation="180"]
|
2023-09-15 23:32:16 +09:00
|
|
|
) {
|
2023-11-09 02:13:15 +09:00
|
|
|
.editToolbar {
|
|
|
|
rotate: 270deg;
|
|
|
|
|
|
|
|
&:dir(ltr) {
|
2023-11-24 22:05:29 +09:00
|
|
|
inset-inline-end: calc(0px - var(--editor-toolbar-vert-offset));
|
2023-11-09 02:13:15 +09:00
|
|
|
inset-block-start: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:dir(rtl) {
|
2023-11-23 03:02:42 +09:00
|
|
|
inset-inline-end: calc(100% + var(--editor-toolbar-vert-offset));
|
2023-11-24 22:05:29 +09:00
|
|
|
inset-block-start: 0;
|
2023-11-09 02:13:15 +09:00
|
|
|
}
|
|
|
|
}
|
2023-09-15 23:32:16 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&
|
|
|
|
:is(
|
|
|
|
[data-main-rotation="0"] [data-editor-rotation="180"],
|
|
|
|
[data-main-rotation="90"] [data-editor-rotation="90"],
|
|
|
|
[data-main-rotation="180"] [data-editor-rotation="0"],
|
2023-09-19 01:45:14 +09:00
|
|
|
[data-main-rotation="270"] [data-editor-rotation="270"]
|
2023-09-15 23:32:16 +09:00
|
|
|
) {
|
2023-11-09 02:13:15 +09:00
|
|
|
.editToolbar {
|
|
|
|
rotate: 180deg;
|
2023-11-24 22:05:29 +09:00
|
|
|
inset-inline-end: 100%;
|
|
|
|
inset-block-start: calc(0pc - var(--editor-toolbar-vert-offset));
|
2023-11-09 02:13:15 +09:00
|
|
|
}
|
2023-09-15 23:32:16 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&
|
|
|
|
:is(
|
|
|
|
[data-main-rotation="0"] [data-editor-rotation="270"],
|
|
|
|
[data-main-rotation="90"] [data-editor-rotation="180"],
|
|
|
|
[data-main-rotation="180"] [data-editor-rotation="90"],
|
2023-09-19 01:45:14 +09:00
|
|
|
[data-main-rotation="270"] [data-editor-rotation="0"]
|
2023-09-15 23:32:16 +09:00
|
|
|
) {
|
2023-11-09 02:13:15 +09:00
|
|
|
.editToolbar {
|
|
|
|
rotate: 90deg;
|
|
|
|
|
|
|
|
&:dir(ltr) {
|
2023-11-23 03:02:42 +09:00
|
|
|
inset-inline-end: calc(100% + var(--editor-toolbar-vert-offset));
|
2023-11-24 22:05:29 +09:00
|
|
|
inset-block-start: 100%;
|
2023-11-09 02:13:15 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
&:dir(rtl) {
|
2023-11-24 22:05:29 +09:00
|
|
|
inset-inline-start: calc(0px - var(--editor-toolbar-vert-offset));
|
2023-11-09 02:13:15 +09:00
|
|
|
inset-block-start: 0;
|
|
|
|
}
|
|
|
|
}
|
2023-09-15 23:32:16 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-15 21:06:50 +09:00
|
|
|
#altTextDialog {
|
|
|
|
--dialog-bg-color: white;
|
|
|
|
--dialog-border-color: white;
|
2023-10-06 00:43:56 +09:00
|
|
|
--dialog-shadow: 0 2px 14px 0 rgb(58 57 68 / 0.2);
|
2023-09-15 21:06:50 +09:00
|
|
|
--text-primary-color: #15141a;
|
|
|
|
--text-secondary-color: #5b5b66;
|
|
|
|
--hover-filter: brightness(0.9);
|
|
|
|
--focus-ring-color: #0060df;
|
|
|
|
--focus-ring-outline: 2px solid var(--focus-ring-color);
|
|
|
|
|
|
|
|
--textarea-border-color: #8f8f9d;
|
|
|
|
--textarea-bg-color: white;
|
|
|
|
--textarea-fg-color: var(--text-secondary-color);
|
|
|
|
|
|
|
|
--radio-bg-color: #f0f0f4;
|
|
|
|
--radio-checked-bg-color: #fbfbfe;
|
|
|
|
--radio-border-color: #8f8f9d;
|
|
|
|
--radio-checked-border-color: #0060df;
|
|
|
|
|
|
|
|
--button-cancel-bg-color: #f0f0f4;
|
|
|
|
--button-cancel-fg-color: var(--text-primary-color);
|
|
|
|
--button-cancel-border-color: var(--button-cancel-bg-color);
|
|
|
|
--button-cancel-hover-bg-color: var(--button-cancel-bg-color);
|
|
|
|
--button-cancel-hover-fg-color: var(--button-cancel-fg-color);
|
|
|
|
--button-cancel-hover-border-color: var(--button-cancel-hover-bg-color);
|
|
|
|
|
|
|
|
--button-save-bg-color: #0060df;
|
|
|
|
--button-save-fg-color: #fbfbfe;
|
|
|
|
--button-save-hover-bg-color: var(--button-save-bg-color);
|
|
|
|
--button-save-hover-fg-color: var(--button-save-fg-color);
|
|
|
|
--button-save-hover-border-color: var(--button-save-hover-bg-color);
|
|
|
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
--dialog-bg-color: #1c1b22;
|
|
|
|
--dialog-border-color: #1c1b22;
|
|
|
|
--dialog-shadow: 0 2px 14px 0 #15141a;
|
|
|
|
--text-primary-color: #fbfbfe;
|
|
|
|
--text-secondary-color: #cfcfd8;
|
2023-10-06 00:43:56 +09:00
|
|
|
--focus-ring-color: #0df;
|
2023-09-15 21:06:50 +09:00
|
|
|
--hover-filter: brightness(1.4);
|
|
|
|
|
|
|
|
--textarea-bg-color: #42414d;
|
|
|
|
|
|
|
|
--radio-bg-color: #2b2a33;
|
|
|
|
--radio-checked-bg-color: #15141a;
|
2023-10-06 00:43:56 +09:00
|
|
|
--radio-checked-border-color: #0df;
|
2023-09-15 21:06:50 +09:00
|
|
|
|
|
|
|
--button-cancel-bg-color: #2b2a33;
|
2023-10-06 00:43:56 +09:00
|
|
|
--button-save-bg-color: #0df;
|
2023-09-15 21:06:50 +09:00
|
|
|
--button-save-fg-color: #15141a;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (forced-colors: active) {
|
|
|
|
--dialog-bg-color: Canvas;
|
|
|
|
--dialog-border-color: CanvasText;
|
|
|
|
--dialog-shadow: none;
|
|
|
|
--text-primary-color: CanvasText;
|
|
|
|
--text-secondary-color: CanvasText;
|
|
|
|
--hover-filter: none;
|
|
|
|
--focus-ring-color: ButtonBorder;
|
|
|
|
|
|
|
|
--textarea-border-color: ButtonBorder;
|
|
|
|
--textarea-bg-color: Field;
|
|
|
|
--textarea-fg-color: ButtonText;
|
|
|
|
|
|
|
|
--radio-bg-color: ButtonFace;
|
|
|
|
--radio-checked-bg-color: ButtonFace;
|
|
|
|
--radio-border-color: ButtonText;
|
|
|
|
--radio-checked-border-color: ButtonText;
|
|
|
|
|
|
|
|
--button-cancel-bg-color: ButtonFace;
|
|
|
|
--button-cancel-fg-color: ButtonText;
|
|
|
|
--button-cancel-border-color: ButtonText;
|
|
|
|
--button-cancel-hover-bg-color: AccentColor;
|
|
|
|
--button-cancel-hover-fg-color: AccentColorText;
|
|
|
|
|
|
|
|
--button-save-bg-color: ButtonText;
|
|
|
|
--button-save-fg-color: ButtonFace;
|
|
|
|
--button-save-hover-bg-color: AccentColor;
|
|
|
|
--button-save-hover-fg-color: AccentColorText;
|
|
|
|
}
|
|
|
|
|
|
|
|
font: message-box;
|
2023-09-21 01:12:12 +09:00
|
|
|
font-size: 13px;
|
|
|
|
font-weight: 400;
|
2023-09-15 21:06:50 +09:00
|
|
|
line-height: 150%;
|
|
|
|
border-radius: 4px;
|
|
|
|
padding: 12px 16px;
|
|
|
|
border: 1px solid var(--dialog-border-color);
|
|
|
|
background: var(--dialog-bg-color);
|
|
|
|
color: var(--text-primary-color);
|
|
|
|
box-shadow: var(--dialog-shadow);
|
|
|
|
|
2023-09-21 01:12:12 +09:00
|
|
|
&::backdrop {
|
|
|
|
/* This is needed to avoid to darken the image the user want to describe. */
|
2023-09-22 01:40:35 +09:00
|
|
|
mask: url(#alttext-manager-mask);
|
2023-09-21 01:12:12 +09:00
|
|
|
}
|
|
|
|
|
2023-09-19 07:03:49 +09:00
|
|
|
&.positioned {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2023-09-15 21:06:50 +09:00
|
|
|
& #altTextContainer {
|
|
|
|
width: 300px;
|
|
|
|
height: fit-content;
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
|
|
|
gap: 16px;
|
|
|
|
|
2023-09-21 01:12:12 +09:00
|
|
|
& *:focus-visible {
|
2023-09-15 21:06:50 +09:00
|
|
|
outline: var(--focus-ring-outline);
|
|
|
|
outline-offset: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
& .radio {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
|
|
|
gap: 4px;
|
|
|
|
|
|
|
|
& .radioButton {
|
|
|
|
display: flex;
|
|
|
|
gap: 8px;
|
|
|
|
align-self: stretch;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
& input {
|
|
|
|
appearance: none;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
border-radius: 50%;
|
|
|
|
background-color: var(--radio-bg-color);
|
|
|
|
border: 1px solid var(--radio-border-color);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
filter: var(--hover-filter);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:checked {
|
|
|
|
background-color: var(--radio-checked-bg-color);
|
|
|
|
border: 4px solid var(--radio-checked-border-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
& .radioLabel {
|
|
|
|
display: flex;
|
|
|
|
padding-inline-start: 24px;
|
|
|
|
align-items: flex-start;
|
|
|
|
gap: 10px;
|
|
|
|
align-self: stretch;
|
|
|
|
|
|
|
|
& span {
|
|
|
|
flex: 1 0 0;
|
2023-09-21 01:12:12 +09:00
|
|
|
font-size: 11px;
|
2023-09-15 21:06:50 +09:00
|
|
|
color: var(--text-secondary-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
& #overallDescription {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-start;
|
|
|
|
gap: 4px;
|
|
|
|
align-self: stretch;
|
|
|
|
|
|
|
|
& span {
|
|
|
|
align-self: stretch;
|
|
|
|
}
|
|
|
|
|
|
|
|
& .title {
|
2023-09-21 01:12:12 +09:00
|
|
|
font-size: 13px;
|
|
|
|
font-style: normal;
|
|
|
|
font-weight: 590;
|
2023-09-15 21:06:50 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
& #addDescription {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: stretch;
|
|
|
|
gap: 8px;
|
|
|
|
|
|
|
|
& .descriptionArea {
|
|
|
|
flex: 1;
|
|
|
|
padding-inline: 24px 10px;
|
|
|
|
|
|
|
|
textarea {
|
|
|
|
font: inherit;
|
|
|
|
width: 100%;
|
|
|
|
min-height: 75px;
|
|
|
|
padding: 8px;
|
|
|
|
resize: none;
|
|
|
|
margin: 0;
|
|
|
|
box-sizing: border-box;
|
|
|
|
border-radius: 4px;
|
|
|
|
border: 1px solid var(--textarea-border-color);
|
|
|
|
background: var(--textarea-bg-color);
|
|
|
|
color: var(--textarea-fg-color);
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline-offset: 0;
|
|
|
|
border-color: transparent;
|
|
|
|
}
|
2023-11-09 02:13:15 +09:00
|
|
|
|
2023-09-15 21:06:50 +09:00
|
|
|
&:disabled {
|
|
|
|
pointer-events: none;
|
2023-09-19 07:03:49 +09:00
|
|
|
opacity: 0.4;
|
2023-09-15 21:06:50 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
& #buttons {
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
align-items: flex-start;
|
|
|
|
gap: 8px;
|
|
|
|
align-self: stretch;
|
|
|
|
|
|
|
|
button {
|
|
|
|
border-radius: 4px;
|
|
|
|
border: 1px solid;
|
|
|
|
font: menu;
|
|
|
|
font-weight: 600;
|
|
|
|
padding: 4px 16px;
|
|
|
|
width: auto;
|
|
|
|
height: 32px;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
filter: var(--hover-filter);
|
|
|
|
}
|
|
|
|
|
|
|
|
&#altTextCancel {
|
|
|
|
color: var(--button-cancel-fg-color);
|
|
|
|
background-color: var(--button-cancel-bg-color);
|
|
|
|
border-color: var(--button-cancel-border-color);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--button-cancel-hover-fg-color);
|
|
|
|
background-color: var(--button-cancel-hover-bg-color);
|
|
|
|
border-color: var(--button-cancel-hover-border-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&#altTextSave {
|
|
|
|
color: var(--button-save-hover-fg-color);
|
|
|
|
background-color: var(--button-save-hover-bg-color);
|
|
|
|
border-color: var(--button-save-hover-border-color);
|
|
|
|
opacity: 1;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--button-save-hover-fg-color);
|
|
|
|
background-color: var(--button-save-hover-bg-color);
|
|
|
|
border-color: var(--button-save-hover-border-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-23 03:02:42 +09:00
|
|
|
|
|
|
|
.annotationEditorLayer {
|
|
|
|
&[data-main-rotation="0"] {
|
|
|
|
.highlightEditor > .editToolbar {
|
|
|
|
rotate: 0deg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-main-rotation="90"] {
|
|
|
|
.highlightEditor > .editToolbar {
|
|
|
|
rotate: 270deg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-main-rotation="180"] {
|
|
|
|
.highlightEditor > .editToolbar {
|
|
|
|
rotate: 180deg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-main-rotation="270"] {
|
|
|
|
.highlightEditor > .editToolbar {
|
|
|
|
rotate: 90deg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.highlightEditor {
|
|
|
|
position: absolute;
|
|
|
|
background: transparent;
|
|
|
|
z-index: 1;
|
|
|
|
transform-origin: 0 0;
|
|
|
|
cursor: auto;
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
border: none;
|
|
|
|
outline: none;
|
|
|
|
pointer-events: none;
|
|
|
|
transform: none;
|
|
|
|
|
|
|
|
.internal {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.selectedEditor {
|
|
|
|
.internal {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.editToolbar {
|
2023-11-24 22:05:29 +09:00
|
|
|
transform-origin: center !important;
|
2023-11-23 03:02:42 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|