mirror of
https://codeberg.org/vlw/code-export-syntax.git
synced 2025-11-05 04:22:43 +01:00
220 lines
No EOL
3.5 KiB
CSS
220 lines
No EOL
3.5 KiB
CSS
body {
|
|
--width-aside: 300px;
|
|
--width-resize-handle: 3px;
|
|
|
|
display: grid;
|
|
grid-template-rows: 1fr;
|
|
grid-template-columns: 300px 3px 1fr;
|
|
}
|
|
|
|
/* Layout */
|
|
|
|
aside {
|
|
--header-height: 60px;
|
|
|
|
position: relative;
|
|
background-color: #181818;
|
|
|
|
.fields {
|
|
padding: var(--padding);
|
|
|
|
fieldset.radio {
|
|
margin-bottom: 10px;
|
|
|
|
label {
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
}
|
|
|
|
.heading {
|
|
padding-left: var(--padding);
|
|
}
|
|
|
|
.sticky {
|
|
top: var(--padding);
|
|
position: sticky;
|
|
|
|
.export {
|
|
gap: 5px;
|
|
height: var(--header-height);
|
|
display: grid;
|
|
padding: 0 var(--padding);
|
|
grid-template-columns: repeat(1, 1fr);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
resize-handle {
|
|
width: 100%;
|
|
background-color: #373c44;
|
|
}
|
|
|
|
main {
|
|
--font-size: 14px;
|
|
|
|
display: grid;
|
|
padding: 0 var(--padding);
|
|
font-size: var(--font-size);
|
|
user-select: none;
|
|
padding-top: var(--padding);
|
|
padding-bottom: calc(100svh - 20px);
|
|
grid-auto-rows: auto;
|
|
grid-template-columns: 1fr;
|
|
|
|
span > span {
|
|
cursor: default;
|
|
border-radius: 1px;
|
|
|
|
&:hover {
|
|
background-color: rgba(255, 255, 255, .15);
|
|
}
|
|
|
|
&[contenteditable] {
|
|
cursor: text;
|
|
outline: none;
|
|
animation: 500ms cubic-bezier(0.46, 0.03, 0.52, 0.96) infinite alternate pulse;
|
|
background-color: rgba(255, 255, 255, .05);
|
|
}
|
|
|
|
&.empty {
|
|
padding: 0 5px;
|
|
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
|
|
|
|
&::before {
|
|
color: grey;
|
|
content: "<empty>";
|
|
font-size: .85em;
|
|
font-style: italic;
|
|
}
|
|
}
|
|
|
|
main.highlight-spans & {
|
|
border: solid 1px rgba(255, 255, 255, 0.3);
|
|
margin: 0 2px;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Components */
|
|
|
|
edit-span-modal {
|
|
top: 0;
|
|
left: 0;
|
|
width: 400px;
|
|
height: 250px;
|
|
border: solid 1px #373c44;
|
|
display: grid;
|
|
z-index: 1;
|
|
opacity: 0;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
transform: translateY(10px);
|
|
transition:
|
|
var(--anim-duration) opacity,
|
|
var(--anim-duration) transform
|
|
;
|
|
border-radius: 6px;
|
|
pointer-events: none;
|
|
background-color: #181818;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
border-top-left-radius: 0;
|
|
|
|
&.active {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
pointer-events: initial;
|
|
}
|
|
|
|
ol, ul {
|
|
height: 100%;
|
|
overflow: hidden scroll;
|
|
position: relative;
|
|
padding-left: 30px;
|
|
|
|
&::after {
|
|
top: 0;
|
|
right: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
content: "";
|
|
opacity: .3;
|
|
position: absolute;
|
|
pointer-events: none;
|
|
background: linear-gradient(90deg,rgba(0, 0, 0, 0) 93%, rgba(0, 0, 0, 1) 100%);
|
|
}
|
|
|
|
&::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
li {
|
|
cursor: pointer;
|
|
padding: 5px 0;
|
|
|
|
&:not(.active):hover {
|
|
background-color: rgba(255, 255, 255, .05);
|
|
}
|
|
|
|
&::marker {
|
|
color: rgba(255, 255, 255, .3);
|
|
font-size: 11px;
|
|
}
|
|
|
|
&.active {
|
|
background-color: rgba(255, 255, 255, .05);
|
|
}
|
|
|
|
+ li {
|
|
border-top: solid 1px rgba(255, 255, 255, .3);
|
|
}
|
|
|
|
p {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
ul {
|
|
padding-left: 0;
|
|
}
|
|
|
|
> div {
|
|
--buttons-height: 40px;
|
|
|
|
gap: calc(var(--padding) / 2);
|
|
padding: calc(var(--padding) / 2);
|
|
display: grid;
|
|
align-items: center;
|
|
grid-template-rows: var(--buttons-height) 1fr;
|
|
background-color: rgba(255, 255, 255, .07);
|
|
|
|
.buttons {
|
|
gap: 5px;
|
|
display: flex;
|
|
|
|
button {
|
|
width: var(--buttons-height);
|
|
height: var(--buttons-height);
|
|
}
|
|
}
|
|
|
|
.fmt {
|
|
height: 100%;
|
|
padding: 10px;
|
|
overflow: hidden;
|
|
border-radius: 6px;
|
|
background-color: #181818;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Animations */
|
|
|
|
@keyframes pulse {
|
|
from { box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
|
|
to { box-shadow: 0 0 0 1px rgba(255, 255, 255, .4); }
|
|
} |