2023-03-18 14:36:23 +01:00
|
|
|
:root {
|
|
|
|
--text-layer-opacity: 0.2;
|
|
|
|
--text-layer-foreground: transparent;
|
|
|
|
}
|
|
|
|
|
2022-11-20 16:21:13 +01:00
|
|
|
html, body {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
2022-02-07 17:42:47 +01:00
|
|
|
body, canvas {
|
2019-06-28 05:22:08 +02:00
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2021-08-11 11:11:22 +02:00
|
|
|
body {
|
|
|
|
background-color: #c0c0c0;
|
|
|
|
}
|
|
|
|
|
2022-11-20 16:21:13 +01:00
|
|
|
#container {
|
2023-03-17 22:53:36 +01:00
|
|
|
--scale-factor: 1;
|
|
|
|
|
2022-11-20 16:21:13 +01:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: grid;
|
|
|
|
place-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
#container canvas, #container .textLayer {
|
|
|
|
/* overlay child elements on top of each other */
|
|
|
|
grid-row-start: 1;
|
|
|
|
grid-column-start: 1;
|
|
|
|
}
|
|
|
|
|
2023-04-06 09:42:50 +02:00
|
|
|
canvas {
|
2022-11-20 16:21:13 +01:00
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2019-06-28 05:22:08 +02:00
|
|
|
.textLayer {
|
2021-11-25 04:20:26 +01:00
|
|
|
text-align: initial;
|
2023-04-06 09:42:50 +02:00
|
|
|
position: absolute;
|
2019-06-28 05:22:08 +02:00
|
|
|
overflow: hidden;
|
2023-03-18 14:36:23 +01:00
|
|
|
opacity: var(--text-layer-opacity);
|
2021-11-25 04:20:26 +01:00
|
|
|
line-height: 1;
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-11-25 04:20:26 +01:00
|
|
|
.textLayer span,
|
|
|
|
.textLayer br {
|
2023-03-18 14:36:23 +01:00
|
|
|
color: var(--text-layer-foreground);
|
2019-06-28 05:22:08 +02:00
|
|
|
position: absolute;
|
|
|
|
white-space: pre;
|
|
|
|
cursor: text;
|
2023-03-17 23:03:17 +01:00
|
|
|
transform-origin: 0 0;
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight {
|
|
|
|
margin: -1px;
|
|
|
|
padding: 1px;
|
2021-11-25 04:20:26 +01:00
|
|
|
background-color: rgba(180, 0, 170, 1);
|
2019-06-28 05:22:08 +02:00
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
|
2021-11-25 04:20:26 +01:00
|
|
|
.textLayer .highlight.appended {
|
|
|
|
position: initial;
|
|
|
|
}
|
|
|
|
|
2019-06-28 05:22:08 +02:00
|
|
|
.textLayer .highlight.begin {
|
2021-11-25 04:20:26 +01:00
|
|
|
border-radius: 4px 0 0 4px;
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight.end {
|
2021-11-25 04:20:26 +01:00
|
|
|
border-radius: 0 4px 4px 0;
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight.middle {
|
2021-11-25 04:20:26 +01:00
|
|
|
border-radius: 0;
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .highlight.selected {
|
2021-11-25 04:20:26 +01:00
|
|
|
background-color: rgba(0, 100, 0, 1);
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
|
|
|
|
2021-11-25 04:20:26 +01:00
|
|
|
.textLayer ::selection {
|
|
|
|
background: rgba(0, 0, 255, 1);
|
|
|
|
}
|
2019-06-28 05:22:08 +02:00
|
|
|
|
|
|
|
.textLayer .endOfContent {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2021-11-25 04:20:26 +01:00
|
|
|
left: 0;
|
2019-06-28 05:22:08 +02:00
|
|
|
top: 100%;
|
2021-11-25 04:20:26 +01:00
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2019-06-28 05:22:08 +02:00
|
|
|
z-index: -1;
|
|
|
|
cursor: default;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.textLayer .endOfContent.active {
|
2021-11-25 04:20:26 +01:00
|
|
|
top: 0;
|
2019-06-28 05:22:08 +02:00
|
|
|
}
|
2023-03-18 11:00:25 +01:00
|
|
|
|
|
|
|
[data-main-rotation="90"] {
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
|
|
|
[data-main-rotation="180"] {
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
|
|
|
[data-main-rotation="270"] {
|
|
|
|
transform: rotate(270deg);
|
|
|
|
}
|