Skip to content

Commit 37a452b

Browse files
committed
Update pydoctheme.css
1 parent 5822f35 commit 37a452b

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

python_docs_theme/static/pydoctheme.css

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,6 @@
88
--bad-border: rgb(244, 76, 78);
99
}
1010

11-
@font-face {
12-
font-family: "Vazirmatn";
13-
src: url("fonts/Vazirmatn-VF.woff2") format("woff2");
14-
font-weight: 100 900;
15-
font-style: normal;
16-
font-display: swap;
17-
}
18-
19-
:lang(fa) :is(
20-
body,
21-
div.body :is(h1, h2, h3, h4, h5, h6),
22-
form.inline-search input,
23-
div.sphinxsidebar input,
24-
div.related input
25-
) {
26-
font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
27-
}
28-
2911
/* unset some styles from the classic stylesheet */
3012
div.document,
3113
div.body,
@@ -287,6 +269,28 @@ div.body hr {
287269
height: 1px;
288270
}
289271

272+
/* Persian (fa) uses Vazirmatn, since the default system font stack renders
273+
Arabic-script text poorly on many platforms. This is scoped to :lang(fa)
274+
rather than [dir='rtl'] so other RTL languages (Arabic, Hebrew, Urdu...)
275+
and all LTR languages are unaffected. */
276+
@font-face {
277+
font-family: "Vazirmatn";
278+
src: url("fonts/Vazirmatn-VF.woff2") format("woff2");
279+
font-weight: 100 900;
280+
font-style: normal;
281+
font-display: swap;
282+
}
283+
284+
:lang(fa) :is(
285+
body,
286+
div.body :is(h1, h2, h3, h4, h5, h6),
287+
form.inline-search input,
288+
div.sphinxsidebar input,
289+
div.related input
290+
) {
291+
font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
292+
}
293+
290294
body[dir='rtl'] {
291295
& pre,
292296
& code,

0 commit comments

Comments
 (0)