Skip to content

Commit

Permalink
improve RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamSH-LLK committed Jun 1, 2024
1 parent 429928a commit 44bbb9c
Showing 1 changed file with 57 additions and 23 deletions.
80 changes: 57 additions & 23 deletions source/_static/css/frc-rtl.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
@import url('https://fonts.googleapis.com/css2?family=Heebo&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Heebo&display=swap");

body, .rst-content .toctree-wrapper > p.caption, h1, h2, h3, h4, h5, h6, legend {
font-family: 'Heebo', sans-serif;
body,
.content .toctree-wrapper > p.caption,
h1,
h2,
h3,
h4,
h5,
h6,
legend {
font-family: "Heebo", sans-serif;
}
body {
direction: rtl;
}
.fa:before {
transform: scale(-1, 1);
}
.rst-content div[class^=highlight] pre, .highlighttable {
.content div[class^="highlight"] pre,
.highlighttable {
direction: ltr;
}
.rst-content code, .rst-content tt {
.content code,
.content tt {
direction: ltr;
unicode-bidi: bidi-override;
}
Expand All @@ -21,11 +31,13 @@ body {
margin-right: 320px;
margin-left: 0;
}
#link-bar li, .wy-nav-top i {
#link-bar li,
.wy-nav-top i {
float: right;
}

.wy-nav-side, .rst-versions {
aside.sidebar-drawer,
.rst-versions {
right: 0;
left: unset;
}
Expand All @@ -34,42 +46,64 @@ body {
margin-left: 0;
}
@media screen and (max-width: 768px) {
.wy-nav-side, .rst-versions {
aside.sidebar-drawer,
.rst-versions {
right: -300px;
}
.wy-nav-content-wrap {
margin-right: 0;
}
.wy-nav-side.shift, .rst-versions.shift {
aside.sidebar-drawer.shift,
.rst-versions.shift {
right: 0;
left: unset;
}
.wy-nav-content-wrap.shift {
right: 85%;
left: unset;
}
}

.rst-content .admonition-title:before {
.content .admonition-title:before {
margin-right: 0;
margin-left: 4px;
}
.wy-breadcrumbs li.wy-breadcrumbs-aside {
float: left;
}
.float-right {

.float-right,
.related-pages a.next-page[href],
div.content-icon-container {
float: left;
clear: left;
}
.float-left {
.float-left,
.related-pages a.prev-page[href] {
float: right;
clear: right;
}
.related-pages a.prev-page svg.furo-related-icon {
transform: revert;
}
.related-pages a.next-page svg.furo-related-icon {
transform: scaleX(-1);
}

.rst-versions .rst-current-version {
text-align: left;
}
.rst-versions .rst-current-version .fa-book, .rst-versions .rst-current-version .icon-book {
.rst-versions .rst-current-version .fa-book,
.rst-versions .rst-current-version .icon-book {
float: right;
}
.rst-other-versions {
text-align: right;
}

/* Furo uses padding-left by default, which looks wrong on RTL */
.toc-tree > ul > li:first-child > ul {
padding-inline-start: 0;
padding-left: initial;
}
.toc-tree ul {
padding-inline-start: var(--toc-item-spacing-horizontal);
padding-left: initial;
}
.toc-title {
padding-inline-start: var(--toc-item-spacing-horizontal);
padding-left: initial;
}
.page::before {
transform: scaleX(-1);
}

0 comments on commit 44bbb9c

Please sign in to comment.