86 lines
1.9 KiB
CSS
86 lines
1.9 KiB
CSS
|
/* 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.
|
||
|
*/
|
||
|
|
||
|
:root {
|
||
|
--focus-outline: solid 2px red;
|
||
|
--hover-outline: dashed 2px blue;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer {
|
||
|
background: transparent;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor {
|
||
|
position: absolute;
|
||
|
background: transparent;
|
||
|
border-radius: 3px;
|
||
|
padding: 5px;
|
||
|
resize: none;
|
||
|
width: auto;
|
||
|
height: auto;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor .internal {
|
||
|
background: transparent;
|
||
|
border: none;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
min-height: 15px;
|
||
|
overflow: visible;
|
||
|
white-space: nowrap;
|
||
|
resize: none;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor .overlay {
|
||
|
position: absolute;
|
||
|
display: none;
|
||
|
background: transparent;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor .overlay.enabled {
|
||
|
display: block;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor .internal:empty::before {
|
||
|
content: attr(default-content);
|
||
|
color: gray;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor .internal:focus {
|
||
|
outline: none;
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor:focus-within {
|
||
|
outline: var(--focus-outline);
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .freeTextEditor:hover:not(:focus-within) {
|
||
|
outline: var(--hover-outline);
|
||
|
}
|
||
|
|
||
|
.annotationEditorLayer .selectedEditor {
|
||
|
outline: var(--focus-outline);
|
||
|
resize: none;
|
||
|
}
|