mirror of
https://github.com/outline/outline.git
synced 2026-11-21 13:34:02 +03:00
feat: Line-height adjustments for Chinese, Japanese and Korean documents (#13822)
This commit is contained in:
1 parent
ce33ca5b5f
commit
488bbb7461
3 files changed
+19
No files matched your search
@@ -523,6 +523,21 @@ const textStyle = () => css`
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
}
|
||||
|
||||
/* East Asian scripts */
|
||||
:lang(zh), /* Chinese */
|
||||
:lang(ja), /* Japanese */
|
||||
:lang(ko) {
|
||||
/* Korean */
|
||||
p {
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.ProseMirror > p {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const style = (props: Props) => css`
|
||||
|
||||
@@ -37,6 +37,7 @@ describe("getSupportedLanguage", () => {
|
||||
describe("getLangFor", () => {
|
||||
it("returns languages that need special text styling", () => {
|
||||
expect(getLangFor("fa")).toEqual("fa");
|
||||
expect(getLangFor("zh")).toEqual("zh");
|
||||
});
|
||||
|
||||
it("ignores other or empty languages", () => {
|
||||
|
||||
@@ -91,6 +91,9 @@ const scriptsWithLang = new Set([
|
||||
"he", // Hebrew
|
||||
"am", // Amharic
|
||||
"mn", // Mongolian
|
||||
"zh", // Chinese
|
||||
"ja", // Japanese
|
||||
"ko", // Korean
|
||||
]);
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user