Skip to content

Commit 6d36814

Browse files
committed
Address reviews
1 parent 1923a64 commit 6d36814

2 files changed

Lines changed: 42 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To use this theme, add the following to `conf.py`:
2222

2323
- `html_sidebars`, defaults taken from https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
2424

25-
- `is_rtl` - Enable right-to-left (RTL) layout for languages such as Persian, Arabic, or Hebrew. Code blocks remain left-to-right. Defaults to `false`.
25+
- `is_rtl` - Enable right-to-left (RTL) layout for languages such as Persian, Arabic, or Hebrew. Code blocks remain left-to-right. Defaults to `"false"`. Set via `html_theme_options = {"is_rtl": "true"}`.
2626

2727
## Translation
2828

python_docs_theme/static/pydoctheme.css

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ div.sphinxsidebar input[type='text'] {
231231
border-left: none;
232232
}
233233

234+
body[dir='rtl'] #sidebarbutton {
235+
border-radius: 5px 0 0 5px;
236+
border-right: none;
237+
border-left: none;
238+
}
239+
234240
#sidebarbutton:hover {
235241
background-color: #AAAAAA;
236242
}
@@ -273,6 +279,10 @@ dl > dt span ~ em,
273279
unicode-bidi: isolate;
274280
}
275281

282+
body[dir='rtl'] .sig {
283+
text-align: right;
284+
}
285+
276286
div.body pre {
277287
border-radius: 3px;
278288
border: 1px solid #ac9;
@@ -454,6 +464,32 @@ table.footnote td {
454464
border: 0 !important;
455465
}
456466

467+
body[dir='rtl'] div#search-results,
468+
body[dir='rtl'] div#search-results ul.search li {
469+
direction: rtl;
470+
text-align: right;
471+
unicode-bidi: isolate;
472+
}
473+
474+
body[dir='rtl'] div#search-results ul.search li p {
475+
text-align: right;
476+
}
477+
478+
body[dir='rtl'] div.citation > span {
479+
float: right;
480+
}
481+
482+
body[dir='rtl'] aside.footnote > span {
483+
float: right;
484+
padding-right: 0;
485+
padding-left: 0.5rem;
486+
}
487+
488+
body[dir='rtl'] aside.footnote > p {
489+
margin-left: 0;
490+
margin-right: 2rem;
491+
}
492+
457493
div.footer {
458494
line-height: 150%;
459495
text-align: end;
@@ -465,6 +501,11 @@ div.footer a {
465501
text-underline-offset: auto;
466502
}
467503

504+
dl > dt span ~ em,
505+
.sig {
506+
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
507+
}
508+
468509
div.footer a:hover {
469510
color: #0095c4;
470511
}
@@ -475,11 +516,6 @@ div.footer a:hover {
475516
--refcount-return-borrowed-ref: var(--middle-color);
476517
}
477518

478-
dl > dt span ~ em,
479-
.sig {
480-
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
481-
}
482-
483519
.refcount {
484520
color: var(--refcount);
485521
}

0 commit comments

Comments
 (0)