Skip to content

Commit 5aef840

Browse files
committed
🎨 #17741
1 parent 62c8419 commit 5aef840

2 files changed

Lines changed: 30 additions & 23 deletions

File tree

app/src/assets/scss/protyle/_content.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,36 @@
77
display: flex;
88
flex-direction: column;
99

10+
&.rtl {
11+
.protyle-title__input,
12+
.protyle-wysiwyg .p,
13+
.protyle-wysiwyg .table table,
14+
.protyle-wysiwyg .render-node protyle-html,
15+
.protyle-wysiwyg [data-type="NodeHeading"] {
16+
direction: rtl
17+
}
18+
19+
.protyle-wysiwyg [data-node-id].li > .protyle-action {
20+
right: 0;
21+
left: auto;
22+
direction: rtl;
23+
}
24+
25+
.protyle-wysiwyg [data-node-id].li > [data-node-id] {
26+
margin-right: 34px;
27+
margin-left: 0;
28+
}
29+
30+
.protyle-wysiwyg [data-node-id].li::before {
31+
right: 17px;
32+
left: auto;
33+
}
34+
35+
.b3-typography table:not([style*="text-align: left"]) {
36+
margin-left: auto;
37+
}
38+
}
39+
1040
&-preview {
1141
flex: 1;
1242
user-select: text;

app/src/util/assets.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -274,29 +274,6 @@ export const setInlineStyle = async (set = true, servePath = "../../../") => {
274274
}
275275
style += `\n:root { --b3-font-size-editor: ${window.siyuan.config.editor.fontSize}px }
276276
.b3-typography code:not(.hljs), .protyle-wysiwyg span[data-type~=code] { font-variant-ligatures: ${window.siyuan.config.editor.codeLigatures ? "normal" : "none"} }${window.siyuan.config.editor.justify ? "\n.protyle-wysiwyg [data-node-id] { text-align: justify }" : ""}`;
277-
if (window.siyuan.config.editor.rtl) {
278-
style += `\n.protyle-title__input,
279-
.protyle-wysiwyg .p,
280-
.protyle-wysiwyg .table table,
281-
.protyle-wysiwyg .render-node protyle-html,
282-
.protyle-wysiwyg [data-type="NodeHeading"] {direction: rtl}
283-
.protyle-wysiwyg [data-node-id].li > .protyle-action {
284-
right: 0;
285-
left: auto;
286-
direction: rtl;
287-
}
288-
.protyle-wysiwyg [data-node-id].li > [data-node-id] {
289-
margin-right: 34px;
290-
margin-left: 0;
291-
}
292-
.protyle-wysiwyg [data-node-id].li::before {
293-
right: 17px;
294-
left: auto;
295-
}
296-
.b3-typography table:not([style*="text-align: left"]) {
297-
margin-left: auto;
298-
}`;
299-
}
300277
if (window.siyuan.config.editor.fontFamily) {
301278
style += `\n.b3-typography:not(.b3-typography--default), .protyle-wysiwyg, .protyle-title {${window.siyuan.config.editor.fontWeight ? `font-weight: ${window.siyuan.config.editor.fontWeight};` : ""}font-family: "Emojis Additional", "Emojis Reset", "${window.siyuan.config.editor.fontFamily}", var(--b3-font-family)}`;
302279
}

0 commit comments

Comments
 (0)