203 lines
6.6 KiB
CSS
203 lines
6.6 KiB
CSS
@media print {
|
|
span.cm-tab {
|
|
width: 50px !important;
|
|
display: inline-block;
|
|
}
|
|
|
|
.is-auto .esm-ltr {
|
|
direction: ltr;
|
|
text-align-last: left;
|
|
}
|
|
|
|
.is-auto .esm-rtl {
|
|
direction: rtl;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
/* List indent fix */
|
|
.is-mobile .is-rtl .HyperMD-list-line, .is-mobile .HyperMD-list-line[dir="rtl"] {
|
|
text-indent: 0px !important;
|
|
padding-left: 0 !important;
|
|
}
|
|
|
|
.CodeMirror-rtl pre {
|
|
text-indent: 0px !important;
|
|
}
|
|
|
|
/* Embedded links always LTR */
|
|
.embedded-backlinks {
|
|
direction: ltr;
|
|
}
|
|
|
|
/* Patch YAML RTL */
|
|
/* In a preview that is strictly RTL (is-rtl) and the settings ask to right-aline YAML (rtl-yaml), set a YAML block to RTL. */
|
|
.is-rtl.rtl-yaml code.language-yaml {
|
|
text-align: right;
|
|
}
|
|
/* Then move the 'copy' button to the left */
|
|
.is-rtl.rtl-yaml code.language-yaml + button.copy-code-button {
|
|
right: unset;
|
|
left: 0;
|
|
}
|
|
/* In a preview that is auto (is-auto), and the YAML was detected as RTL (esm-rtl), set the 'copy' button to the left */
|
|
.is-auto .esm-rtl.language-yaml + button.copy-code-button {
|
|
right: unset;
|
|
left: 0;
|
|
}
|
|
|
|
/* In RTL, or in Auto with a first line that is RTL, set the flair (where it says e.g. 'yaml' in Edit mode) to the left */
|
|
.is-rtl div:has(.HyperMD-codeblock-begin) .code-block-flair,
|
|
.is-auto div:has(.HyperMD-codeblock-begin + .HyperMD-codeblock[dir="rtl"]) .code-block-flair {
|
|
right: unset;
|
|
left: 6px;
|
|
}
|
|
|
|
/* RTL and Auto callout titles that are detected as RTL - set to the right */
|
|
.is-rtl .callout-title:has(.esm-rtl),
|
|
.is-auto .callout-title:has(.esm-rtl) {
|
|
direction: rtl;
|
|
}
|
|
.is-auto .callout-content .esm-rtl {
|
|
direction: rtl;
|
|
}
|
|
/* When an RTL callout title was set to the right, left-justify its edit block button */
|
|
.is-rtl div.cm-callout:has(.callout-title .esm-rtl) .edit-block-button,
|
|
.is-auto div.cm-callout:has(.callout-title .esm-rtl) .edit-block-button {
|
|
right: unset;
|
|
left: var(--size-2-2);
|
|
}
|
|
|
|
.markdown-source-view .cm-line[dir="rtl"] .task-list-label {
|
|
margin-left: 0;
|
|
margin-right: -3px;
|
|
}
|
|
|
|
/* Better spacing between bullet and text */
|
|
.outliner-plugin-better-bullets .markdown-source-view.is-rtl .cm-formatting-list-ul,
|
|
.outliner-plugin-better-bullets .markdown-source-view .cm-line[dir="rtl"] .cm-formatting-list-ul {
|
|
margin-right: 0;
|
|
margin-left: 0.3em;
|
|
}
|
|
|
|
.markdown-source-view.is-rtl .is-collapsed .collapse-indicator svg.svg-icon,
|
|
.markdown-source-view .cm-line[dir="rtl"] .is-collapsed .collapse-indicator svg.svg-icon {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
/* Styling for collapse indicator on the headings */
|
|
.markdown-source-view.is-rtl .cm-line .cm-fold-indicator .collapse-indicator,
|
|
.markdown-source-view .cm-line[dir="rtl"] .cm-fold-indicator .collapse-indicator {
|
|
padding-right: 0;
|
|
padding-left: 6px;
|
|
right: -16px;
|
|
}
|
|
|
|
/* Styling for collapse indicator on the lists */
|
|
.markdown-source-view.is-rtl .cm-line:not(.cm-active):not(.HyperMD-header):not(.HyperMD-task-line) .cm-fold-indicator .collapse-indicator,
|
|
.markdown-source-view .cm-line[dir="rtl"]:not(.cm-active):not(.HyperMD-header):not(.HyperMD-task-line) .cm-fold-indicator .collapse-indicator {
|
|
padding-right: 0;
|
|
padding-left: 18px;
|
|
right: -16px;
|
|
}
|
|
|
|
/* Styling for tags in RTL */
|
|
.markdown-source-view.is-rtl .cm-line .cm-hashtag.cm-hashtag-begin,
|
|
.markdown-source-view .cm-line[dir="rtl"] .cm-hashtag.cm-hashtag-begin {
|
|
border-top-right-radius: var(--tag-radius);
|
|
border-bottom-right-radius: var(--tag-radius);
|
|
border-top-left-radius: 0;
|
|
border-bottom-left-radius: 0;
|
|
border-left: none;
|
|
border-right: var(--tag-border-width) solid var(--tag-border-color);
|
|
padding-right: var(--tag-padding-x);
|
|
padding-left: 0;
|
|
}
|
|
.markdown-source-view.is-rtl .cm-line .cm-hashtag.cm-hashtag-end,
|
|
.markdown-source-view .cm-line[dir="rtl"] .cm-hashtag.cm-hashtag-end {
|
|
border-top-left-radius: var(--tag-radius);
|
|
border-bottom-left-radius: var(--tag-radius);
|
|
border-top-right-radius: 0;
|
|
border-bottom-right-radius: 0;
|
|
border-right: none;
|
|
border-left: var(--tag-border-width) solid var(--tag-border-color);
|
|
padding-left: var(--tag-padding-x);
|
|
padding-right: 0;
|
|
}
|
|
|
|
.markdown-preview-view.is-auto .esm-rtl,
|
|
.kanban-plugin__board .esm-rtl,
|
|
.kanban-plugin__drag-container .esm-rtl {
|
|
direction: rtl;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Moving bullets to right side of the page and adding enough space between the bullet and the text */
|
|
.markdown-preview-view.is-auto .esm-rtl > .list-bullet,
|
|
.markdown-preview-view.is-rtl .list-bullet {
|
|
float: right;
|
|
margin-right: -12px;
|
|
}
|
|
|
|
/* Fixing indentation guides in nested lists */
|
|
.markdown-preview-view.is-auto.show-indentation-guide li.esm-rtl > ul::before,
|
|
.markdown-preview-view.is-auto.show-indentation-guide li.esm-rtl > ol::before {
|
|
left: auto;
|
|
right: -15px;
|
|
}
|
|
|
|
/* Moving the collapse indicator to right side of the page */
|
|
.markdown-preview-view.is-auto .esm-rtl > .collapse-indicator,
|
|
.markdown-preview-view.is-rtl .collapse-indicator {
|
|
float: right;
|
|
}
|
|
|
|
/* Moving the collapse indicator icon on the right of the text with enough space between */
|
|
.markdown-preview-view.is-auto .esm-rtl > .list-collapse-indicator,
|
|
.markdown-preview-view.is-rtl .list-collapse-indicator {
|
|
margin-right: -48px;
|
|
padding-left: 18px;
|
|
}
|
|
|
|
/* Moving the heading collapse indicator on the right of the text. Without
|
|
This the collapse indicator will be over the heading text */
|
|
.markdown-preview-view.is-auto .esm-rtl > .heading-collapse-indicator,
|
|
.markdown-preview-view.is-rtl .heading-collapse-indicator {
|
|
margin-right: -22px;
|
|
}
|
|
|
|
/* Mirroring collapse icon for nested lists so it points to rtl text not outside of page */
|
|
.markdown-preview-view.is-auto .esm-rtl > .collapse-icon .is-collapsed svg.svg-icon,
|
|
.markdown-preview-view.is-auto .esm-rtl.is-collapsed > .collapse-icon svg.svg-icon,
|
|
.markdown-preview-view.is-rtl .collapse-icon .is-collapsed svg.svg-icon {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
/* Mirroring collapse icon for headings so it points to rtl text not outside of page */
|
|
.markdown-preview-view .is-collapsed .esm-rtl > .collapse-icon svg.svg-icon,
|
|
.markdown-preview-view.is-rtl .collapse-icon svg.svg-icon {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
/* Reverting the margin so the text won't stick to the checkbox */
|
|
.markdown-preview-view.is-auto .esm-rtl > .task-list-item-checkbox,
|
|
.markdown-preview-view.is-rtl .task-list-item-checkbox {
|
|
margin-left: 6px;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.markdown-preview-view.is-auto .esm-ltr {
|
|
direction: ltr;
|
|
text-align-last: left;
|
|
}
|
|
|
|
/* Helper styles for debugging */
|
|
/* .cm-line[dir="rtl"] { */
|
|
/* border-right: dashed; */
|
|
/* border-right-color: blue; */
|
|
/* } */
|
|
/* .cm-line[dir="ltr"] { */
|
|
/* border-right: dashed; */
|
|
/* border-right-color: red; */
|
|
/* } */
|