expand: simplify RTL support

This commit is contained in:
Sören Weber 2023-02-09 01:02:06 +01:00
parent 381b74f837
commit 09ea211204
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 7 additions and 6 deletions

View file

@ -12,8 +12,7 @@
<input type="checkbox" id="expand-{{ $id }}" aria-controls="expandcontent-{{ $id }}" {{ if $expanded }} checked{{ end }}> <input type="checkbox" id="expand-{{ $id }}" aria-controls="expandcontent-{{ $id }}" {{ if $expanded }} checked{{ end }}>
<label class="expand-label" for="expand-{{ $id }}" > <label class="expand-label" for="expand-{{ $id }}" >
<i class="fas fa-chevron-down"></i> <i class="fas fa-chevron-down"></i>
<i class="fas fa-chevron-left expand-rtl"></i> <i class="fas fa-chevron-right"></i>
<i class="fas fa-chevron-right expand-ltr"></i>
{{ $title }} {{ $title }}
</label> </label>
<div id="expandcontent-{{ $id }}" class="expand-content"> <div id="expandcontent-{{ $id }}" class="expand-content">

View file

@ -14,6 +14,9 @@
html[dir="rtl"] .progress { html[dir="rtl"] .progress {
left: 4.25rem; left: 4.25rem;
} }
html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
transform: scaleX(1);
}
article, article,
.toc-wrapper, .toc-wrapper,
.tags { .tags {

View file

@ -1136,10 +1136,9 @@ option {
display: none; display: none;
} }
/* turn off unsuitable expander for this reading direction */ /* adjust expander for RTL reading direction */
html[dir="ltr"] .expand > .expand-label > .expand-rtl, html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
html[dir="rtl"] .expand > .expand-label > .expand-ltr { transform: scaleX(-1);
display: none;
} }
#body footer.footline{ #body footer.footline{