2024-05-15 01:53:03 +02:00
|
|
|
// Copyright 2024, Command Line Inc.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2024-05-14 18:37:41 +02:00
|
|
|
.markdown {
|
2024-09-05 06:15:39 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
overflow: hidden;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
.content {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
overflow: scroll;
|
|
|
|
line-height: 1.5;
|
2024-07-03 23:32:55 +02:00
|
|
|
color: var(--app-text-color);
|
2024-09-05 06:15:39 +02:00
|
|
|
font-family: var(--markdown-font);
|
|
|
|
font-size: 14px;
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
&:first-of-type {
|
|
|
|
margin-top: 0 !important;
|
|
|
|
}
|
|
|
|
color: var(--app-text-color);
|
|
|
|
margin-top: 16px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
strong {
|
2024-07-03 23:32:55 +02:00
|
|
|
color: var(--app-text-color);
|
2024-05-14 18:37:41 +02:00
|
|
|
}
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
a {
|
|
|
|
color: #32afff;
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-06 21:59:28 +02:00
|
|
|
p,
|
|
|
|
ul,
|
|
|
|
ol,
|
|
|
|
dl,
|
|
|
|
table,
|
|
|
|
details table {
|
|
|
|
margin-bottom: 10px;
|
2024-09-05 06:15:39 +02:00
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
ul {
|
|
|
|
list-style-type: disc;
|
|
|
|
list-style-position: outside;
|
|
|
|
margin-left: 16px;
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
ol {
|
|
|
|
list-style-position: outside;
|
|
|
|
margin-left: 19px;
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
blockquote {
|
|
|
|
margin: 4px 10px 4px 10px;
|
|
|
|
border-radius: 3px;
|
|
|
|
background-color: var(--panel-bg-color);
|
|
|
|
padding: 2px 4px 2px 6px;
|
2024-07-03 23:32:55 +02:00
|
|
|
}
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
pre.codeblock {
|
|
|
|
background-color: var(--panel-bg-color);
|
|
|
|
margin: 4px 10px;
|
|
|
|
padding: 0.4em 0.7em;
|
2024-07-03 23:32:55 +02:00
|
|
|
border-radius: 4px;
|
2024-09-05 06:15:39 +02:00
|
|
|
position: relative;
|
|
|
|
|
|
|
|
code {
|
|
|
|
line-height: 1.5;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
word-wrap: break-word;
|
|
|
|
overflow: auto;
|
|
|
|
overflow: hidden;
|
2024-09-09 21:05:15 +02:00
|
|
|
background-color: transparent;
|
2024-09-05 06:15:39 +02:00
|
|
|
}
|
2024-07-03 23:32:55 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
.codeblock-actions {
|
|
|
|
visibility: hidden;
|
|
|
|
display: flex;
|
|
|
|
position: absolute;
|
2024-09-09 20:56:21 +02:00
|
|
|
top: 0;
|
|
|
|
right: 0;
|
2024-09-05 06:15:39 +02:00
|
|
|
border-radius: 4px;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
i {
|
|
|
|
color: var(--line-actions-inactive-color);
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--line-actions-active-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.fa-check {
|
|
|
|
color: var(--success-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.fa-square-terminal {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2024-07-03 23:32:55 +02:00
|
|
|
}
|
2024-09-05 06:15:39 +02:00
|
|
|
}
|
2024-07-03 23:32:55 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
&:hover .codeblock-actions {
|
|
|
|
visibility: visible;
|
2024-07-03 23:32:55 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
code {
|
2024-09-09 21:09:31 +02:00
|
|
|
color: var(--main-text-color);
|
|
|
|
font: var(--fixed-font);
|
2024-09-05 06:15:39 +02:00
|
|
|
border-radius: 4px;
|
2024-05-14 18:37:41 +02:00
|
|
|
}
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
pre.selected {
|
|
|
|
outline: 2px solid var(--accent-color);
|
|
|
|
}
|
2024-07-03 23:32:55 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
.heading {
|
|
|
|
font-weight: semibold;
|
|
|
|
padding-top: 6px;
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
.heading.is-1 {
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
padding-bottom: 6px;
|
|
|
|
font-size: 2em;
|
|
|
|
}
|
|
|
|
.heading.is-2 {
|
|
|
|
border-bottom: 1px solid var(--border-color);
|
|
|
|
padding-bottom: 6px;
|
|
|
|
font-size: 1.5em;
|
|
|
|
}
|
|
|
|
.heading.is-3 {
|
|
|
|
font-size: 1.25em;
|
|
|
|
}
|
|
|
|
.heading.is-4 {
|
|
|
|
font-size: 1em;
|
|
|
|
}
|
|
|
|
.heading.is-5 {
|
|
|
|
font-size: 0.875em;
|
|
|
|
}
|
|
|
|
.heading.is-6 {
|
|
|
|
font-size: 0.85em;
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
}
|
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
// The TOC view should scroll independently of the contents view.
|
|
|
|
.toc {
|
|
|
|
max-width: 40%;
|
|
|
|
height: 100%;
|
|
|
|
overflow: scroll;
|
|
|
|
border-left: 1px solid var(--border-color);
|
|
|
|
.toc-inner {
|
|
|
|
height: fit-content;
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: 5px;
|
|
|
|
text-wrap: wrap;
|
2024-05-14 18:37:41 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
h4 {
|
|
|
|
padding-left: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.toc-item {
|
|
|
|
cursor: pointer;
|
|
|
|
--indent-factor: 1;
|
2024-07-03 23:32:55 +02:00
|
|
|
|
2024-09-05 06:15:39 +02:00
|
|
|
// The 5px offset in the padding will ensure that when the text in the item wraps, it indents slightly.
|
|
|
|
// The indent factor is set in the React code and denotes the depth of the item in the TOC tree.
|
|
|
|
padding-left: calc((var(--indent-factor) - 1) * 10px + 5px);
|
|
|
|
text-indent: -5px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-14 18:37:41 +02:00
|
|
|
}
|