Fixes #529 by removing directives (#613)

* Fixes #529 by removing directives
* Load builtin tags on space reindex
This commit is contained in:
Zef Hemel
2024-01-02 14:47:02 +01:00
committed by GitHub
parent 5f4e584e46
commit 8a2e081672
46 changed files with 159 additions and 1445 deletions
-21
View File
@@ -317,27 +317,6 @@
color: var(--editor-frontmatter-marker-color);
}
// Directives
.sb-directive-body {
border-left: 1px solid var(--editor-directive-border-color);
border-right: 1px solid var(--editor-directive-border-color);
}
.cm-line.sb-directive-start,
.cm-line.sb-directive-end {
color: var(--editor-directive-color);
border-color: var(--editor-directive-border-color);
background-color: var(--editor-directive-background-color);
}
.sb-directive-start-outside,
.sb-directive-end-outside {
&>span.sb-directive-placeholder {
color: var(--editor-directive-info-color);
}
}
.sb-emphasis {
font-style: italic;
}
+5 -57
View File
@@ -316,47 +316,6 @@
font-size: 91%;
}
.sb-directive-start {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-style: solid;
border-width: 1px 1px 0 1px;
padding: 3px;
}
.sb-directive-end {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border-style: solid;
border-width: 0 1px 1px 1px;
padding: 3px;
}
.sb-directive-start .sb-comment,
.sb-directive-end .sb-comment {
position: relative;
left: -12px;
}
.sb-directive-start-outside,
.sb-directive-end-outside {
color: transparent;
pointer-events: none;
height: 1.3em;
.sb-directive-placeholder {
padding-right: 7px;
float: right;
font-size: 80%;
}
&>span,
&.sb-directive-start,
&.sb-directive-end {
color: transparent;
}
}
.sb-line-frontmatter-outside,
.sb-line-code-outside {
.sb-meta {
@@ -458,7 +417,7 @@
border-top-left-radius: 5px;
margin: 0 0 5px 0;
padding: 10px !important;
background-color: var(--editor-directive-background-color);
background-color: var(--editor-widget-background-color);
font-size: 1.2em;
}
@@ -474,7 +433,7 @@
.sb-markdown-top-widget:has(*),
.sb-markdown-bottom-widget:has(*) {
overflow-y: auto;
border: 1px solid var(--editor-directive-background-color);
border: 1px solid var(--editor-widget-background-color);
border-radius: 5px;
white-space: normal;
position: relative;
@@ -542,7 +501,7 @@
right: 0;
top: 0;
display: none;
background: var(--editor-directive-background-color);
background: var(--editor-widget-background-color);
padding-inline: 3px;
padding: 4px 0;
// border-radius: 0 5px;
@@ -573,7 +532,7 @@
max-width: 100%;
padding: 0;
margin: 0 0 -2ch 0;
border: 1px solid var(--editor-directive-background-color);
border: 1px solid var(--editor-widget-background-color);
border-radius: 5px;
}
}
@@ -608,15 +567,4 @@
div:not(.cm-focused).cm-fat-cursor {
outline: none !important;
}
// @media only screen and (max-width: 600px) {
// #sb-editor {
// .sb-directive-start-outside,
// .sb-directive-end-outside {
// height: 22px;
// }
// }
// }
}
+2 -2
View File
@@ -150,14 +150,14 @@ body {
.sb-bottom-iframe {
width: 100%;
margin-top: 10px;
border: 1px solid var(--editor-directive-background-color);
border: 1px solid var(--editor-widget-background-color);
border-radius: 5px;
}
.sb-top-iframe {
width: 100%;
margin-top: 10px;
border: 1px solid var(--editor-directive-background-color);
border: 1px solid var(--editor-widget-background-color);
border-radius: 5px;
}
+2 -8
View File
@@ -101,10 +101,7 @@ html {
--editor-frontmatter-background-color: rgba(255, 246, 189, 0.5);
--editor-frontmatter-color: var(--subtle-color);
--editor-frontmatter-marker-color: #89000080;
--editor-directive-background-color: rgb(238, 238, 238);
--editor-directive-border-color: #0000000f;
--editor-directive-color: #5b5b5b;
--editor-directive-info-color: var(--subtle-color);
--editor-widget-background-color: rgb(238, 238, 238);
--editor-task-marker-color: var(--subtle-color);
--editor-task-state-color: var(--subtle-color);
@@ -219,9 +216,6 @@ html[data-theme="dark"] {
--editor-frontmatter-background-color: rgb(41, 40, 35, 0.5);
--editor-frontmatter-color: var(--subtle-color);
--editor-frontmatter-marker-color: #fff;
--editor-directive-background-color: rgba(72, 72, 72, 0.5);
--editor-directive-border-color: #0000000f;
--editor-directive-color: #5b5b5b;
--editor-directive-info-color: var(--subtle-color);
--editor-widget-background-color: rgba(72, 72, 72, 0.5);
--editor-task-marker-color: var(--subtle-color);
}