1
0
silverbullet/packages/web/styles/editor.scss

89 lines
1.7 KiB
SCSS
Raw Normal View History

.cm-editor {
2022-08-02 12:40:04 +00:00
font-size: 18px;
padding: 0 20px;
2022-08-29 13:47:16 +00:00
--max-width: 800px;
.cm-content {
margin: auto;
2022-08-29 13:47:16 +00:00
max-width: var(--max-width);
}
.sb-inline-img {
max-width: calc(var(--max-width) * 0.9);
}
2022-04-04 16:33:13 +00:00
&.cm-focused {
outline: none !important;
}
// Weird hack to readjust iOS's safari font-size when contenteditable is disabled
.ios-safari-readonly {
font-size: 60%;
}
// Indentation of follow-up lines
@mixin lineOverflow($baseIndent) {
text-indent: -1 * ($baseIndent + 2ch);
padding-left: $baseIndent + 2ch;
2022-08-02 12:40:04 +00:00
&.sb-line-task {
text-indent: -1 * ($baseIndent + 6ch);
padding-left: $baseIndent + 6ch;
}
2022-08-02 12:40:04 +00:00
&.sb-line-blockquote {
text-indent: -1 * ($baseIndent + 4ch);
padding-left: $baseIndent + 4ch;
}
}
2022-08-02 12:40:04 +00:00
.sb-line-ul {
&.sb-line-li-1 {
@include lineOverflow(0);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2 {
@include lineOverflow(2);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2.sb-line-li-3 {
@include lineOverflow(4);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4 {
@include lineOverflow(6);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4.sb-line-li-5 {
@include lineOverflow(8);
}
}
2022-08-02 12:40:04 +00:00
.sb-line-ol {
&.sb-line-li-1 {
@include lineOverflow(1);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2 {
@include lineOverflow(2);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2.sb-line-li-3 {
@include lineOverflow(4);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4 {
@include lineOverflow(6);
}
2022-08-02 12:40:04 +00:00
&.sb-line-li-1.sb-line-li-2.sb-line-li-3.sb-line-li-4.sb-line-li-5 {
@include lineOverflow(8);
}
}
2022-08-02 12:40:04 +00:00
.sb-line-comment {
text-indent: -1 * 3ch;
padding-left: 3ch;
}
}