From 5e5582cecaa7271e3ab1c69c898f9ce0ac383291 Mon Sep 17 00:00:00 2001
From: Anika Henke <anika@selfthinker.org>
Date: Thu, 23 Feb 2012 04:11:59 +0000
Subject: [PATCH] changed the way RTL styles are added

Add rtl.css as *screen* style, but append all RTL styles with [dir=rtl].
That has the advantage that all styles are in the same CSS output, so there are no different requests.

Later on all styles in rtl.css should be moved to their respective "parent" css file.
---
 lib/tpl/dokuwiki/css/rtl.css | 326 ++++++++++++++++++-----------------
 lib/tpl/dokuwiki/style.ini   |   2 +-
 2 files changed, 168 insertions(+), 160 deletions(-)

diff --git a/lib/tpl/dokuwiki/css/rtl.css b/lib/tpl/dokuwiki/css/rtl.css
index 851f70850..8a6a9f631 100644
--- a/lib/tpl/dokuwiki/css/rtl.css
+++ b/lib/tpl/dokuwiki/css/rtl.css
@@ -7,28 +7,36 @@
 
 /*____________ basic ____________*/
 
-caption,
-td,
-th {
+[dir=rtl] caption,
+[dir=rtl] td,
+[dir=rtl] th {
     text-align: right;
 }
 
-ul, ol {
+[dir=rtl] ul,
+[dir=rtl] ol {
     padding: 0 1.5em 0 0;
 }
-li, dd {
+[dir=rtl] li,
+[dir=rtl] dd {
     margin: 0 1.5em 0 0;
 }
-blockquote {
+[dir=rtl] blockquote {
     border-width: 0 .25em 0 0;
 }
 
-h1, h2, h3, h4, h5, h6,
-caption, legend {
+[dir=rtl] h1,
+[dir=rtl] h2,
+[dir=rtl] h3,
+[dir=rtl] h4,
+[dir=rtl] h5,
+[dir=rtl] h6,
+[dir=rtl] caption,
+[dir=rtl] legend {
     clear: right;
 }
 
-.a11y {
+[dir=rtl] .a11y {
     left: auto;
     right: -9000px;
 }
@@ -36,70 +44,70 @@ caption, legend {
 
 /*____________ _imgdetail ____________*/
 
-#dokuwiki__detail div.content img {
+[dir=rtl] #dokuwiki__detail div.content img {
     float: right;
     margin-right: 0;
     margin-left: 1.5em;
 }
-#dokuwiki__detail div.content div.img_detail {
+[dir=rtl] #dokuwiki__detail div.content div.img_detail {
     float: right
 }
 
 
 /*____________ _mediamanager ____________*/
 
-#mediamgr__aside {
+[dir=rtl] #mediamgr__aside {
     left: auto;
     right: 0;
     border-right-width: 0;
     border-left: 1px solid __border__;
 }
-#mediamgr__content {
+[dir=rtl] #mediamgr__content {
     right: auto;
     left: 0;
 }
 
-#media__opts input {
+[dir=rtl] #media__opts input {
     margin-right: 0;
     margin-left: .3em;
 }
 
-#media__tree ul {
+[dir=rtl] #media__tree ul {
     padding-left: 0;
     padding-right: .2em;
 }
-#media__tree ul li {
+[dir=rtl] #media__tree ul li {
     clear: right;
     margin-right: 0;
 }
-#media__tree ul li img {
+[dir=rtl] #media__tree ul li img {
     float: right;
     padding: .5em 0 0 .3em;
 }
-#media__tree ul li li {
+[dir=rtl] #media__tree ul li li {
     margin-left: 0;
     margin-right: 1.5em;
 }
 
-#media__content a.mediafile {
+[dir=rtl] #media__content a.mediafile {
     margin-right: 0;
     margin-left: 1.5em;
 }
-#media__content div.detail div.thumb {
+[dir=rtl] #media__content div.detail div.thumb {
     float: right;
     margin: 0 18px 0 .5em;
 }
-#media__content form.meta div.metafield {
+[dir=rtl] #media__content form.meta div.metafield {
     clear: right;
 }
-#media__content form.meta label {
+[dir=rtl] #media__content form.meta label {
     float: right;
     clear: right;
 }
-#media__content form.meta .edit {
+[dir=rtl] #media__content form.meta .edit {
     float: right;
 }
-#media__content form.meta div.buttons {
+[dir=rtl] #media__content form.meta div.buttons {
     clear: right;
     margin: .2em 25% 0 0;
 }
@@ -108,11 +116,11 @@ caption, legend {
 /*____________ _links ____________*/
 
 /* if link icons don't work as expected, remove the following lines */
-.dokuwiki a.urlextern,
-.dokuwiki a.windows,
-.dokuwiki a.mail,
-.dokuwiki a.interwiki,
-.dokuwiki a.mediafile {
+[dir=rtl] .dokuwiki a.urlextern,
+[dir=rtl] .dokuwiki a.windows,
+[dir=rtl] .dokuwiki a.mail,
+[dir=rtl] .dokuwiki a.interwiki,
+[dir=rtl] .dokuwiki a.mediafile {
     background-position: right center;
     padding: 0 17px 0 0;
 }
@@ -120,20 +128,20 @@ caption, legend {
 
 /*____________ _toc ____________*/
 
-.dokuwiki div.toc {
+[dir=rtl] .dokuwiki div.toc {
     float: left;
     margin: 0 1.4em 1.4em 0;
 }
-.dokuwiki .toc span.toc_open,
-.dokuwiki .toc span.toc_close {
+[dir=rtl] .dokuwiki .toc span.toc_open,
+[dir=rtl] .dokuwiki .toc span.toc_close {
     float: left;
 }
-.dokuwiki #toc__inside ul ul {
+[dir=rtl] .dokuwiki #toc__inside ul ul {
     padding-left: 0;
     padding-right: 1em;
 }
 
-.dokuwiki ul.idx {
+[dir=rtl] .dokuwiki ul.idx {
     padding-right: 0;
 }
 
@@ -143,10 +151,10 @@ caption, legend {
 
 /*____________ _search ____________*/
 
-.dokuwiki div.search_quickresult ul li {
+[dir=rtl] .dokuwiki div.search_quickresult ul li {
     float: right;
 }
-.dokuwiki form.search div.ajax_qsearch {
+[dir=rtl] .dokuwiki form.search div.ajax_qsearch {
     left: auto;
     right: -13.5em;
     text-align: right;
@@ -155,8 +163,8 @@ caption, legend {
 
 /*____________ _recent ____________*/
 
-.dokuwiki #dw__recent ul li,
-.dokuwiki #page__revisions ul li {
+[dir=rtl] .dokuwiki #dw__recent ul li,
+[dir=rtl] .dokuwiki #page__revisions ul li {
     margin-right: 0;
 }
 
@@ -166,36 +174,36 @@ caption, legend {
 
 /*____________ _edit ____________*/
 
-.dokuwiki div.toolbar #draft__status {
+[dir=rtl] .dokuwiki div.toolbar #draft__status {
     float: left;
 }
-.dokuwiki #wiki__editbar #size__ctl {
+[dir=rtl] .dokuwiki #wiki__editbar #size__ctl {
     float: left;
 }
-.dokuwiki #wiki__editbar #size__ctl img {
+[dir=rtl] .dokuwiki #wiki__editbar #size__ctl img {
     cursor: pointer;
 }
-.dokuwiki #wiki__editbar .editButtons {
+[dir=rtl] .dokuwiki #wiki__editbar .editButtons {
     margin-right: 0;
     margin-left: 1em;
 }
 
-.dokuwiki .secedit {
+[dir=rtl] .dokuwiki .secedit {
     float: left;
 }
 
 
 /*____________ _modal ____________*/
 
-#link__wiz_close {
+[dir=rtl] #link__wiz_close {
     float: left;
 }
-#link__wiz_result {
+[dir=rtl] #link__wiz_result {
     text-align: right;
 }
-#link__wiz_result div.type_u,
-#link__wiz_result div.type_f,
-#link__wiz_result div.type_d {
+[dir=rtl] #link__wiz_result div.type_u,
+[dir=rtl] #link__wiz_result div.type_f,
+[dir=rtl] #link__wiz_result div.type_d {
     padding: 3px 22px 3px 3px;
     background-position: 257px 3px;
 }
@@ -203,30 +211,30 @@ caption, legend {
 
 /*____________ _forms ____________*/
 
-.dokuwiki label.block {
+[dir=rtl] .dokuwiki label.block {
     text-align: left;
 }
-.dokuwiki label.simple {
+[dir=rtl] .dokuwiki label.simple {
     text-align: right;
 }
 
-form#subscribe__form fieldset {
+[dir=rtl] form#subscribe__form fieldset {
     text-align: right;
 }
 
 
 /*____________ _admin ____________*/
 
-.dokuwiki ul.admin_tasks {
+[dir=rtl] .dokuwiki ul.admin_tasks {
     float: right;
 }
-.dokuwiki ul.admin_tasks li {
+[dir=rtl] .dokuwiki ul.admin_tasks li {
     padding-left: 0;
     padding-right: 35px;
     background-position: right 0;
 }
 
-.dokuwiki #admin__version {
+[dir=rtl] .dokuwiki #admin__version {
     clear: right;
     float: left;
 }
@@ -237,73 +245,73 @@ form#subscribe__form fieldset {
 
 /*____________ structure ____________*/
 
-#dokuwiki__header .headings {
+[dir=rtl] #dokuwiki__header .headings {
     float: right;
     text-align: right;
 }
-#dokuwiki__header .tools {
+[dir=rtl] #dokuwiki__header .tools {
     float: left;
     text-align: left;
 }
 
-#dokuwiki__aside {
+[dir=rtl] #dokuwiki__aside {
     float: right;
 }
-#dokuwiki__aside > .pad {
+[dir=rtl] #dokuwiki__aside > .pad {
     margin: 0 0 0 1.5em;
 }
 
-.hasSidebar #dokuwiki__content {
+[dir=rtl] .hasSidebar #dokuwiki__content {
     float: left;
     margin-left: 0;
     margin-right: -__sidebar_width__;
 }
-.hasSidebar #dokuwiki__content > .pad {
+[dir=rtl] .hasSidebar #dokuwiki__content > .pad {
     margin-left: 0;
     margin-right: __sidebar_width__;
 }
 
 /*____________ design ____________*/
 
-#dokuwiki__header h1 img {
+[dir=rtl] #dokuwiki__header h1 img {
     float: right;
     margin-left: .5em;
     margin-right: 0;
 }
 
-#dokuwiki__sitetools form.search input.edit {
+[dir=rtl] #dokuwiki__sitetools form.search input.edit {
     padding: .35em .1em .35em 22px;
 }
-#dokuwiki__sitetools form.search input.button {
+[dir=rtl] #dokuwiki__sitetools form.search input.button {
     background-position: 5px 0;
     margin-left: 0;
     margin-right: -20px;
 }
 
-#dokuwiki__usertools {
+[dir=rtl] #dokuwiki__usertools {
     text-align: left;
     left: 40px;
     right: auto;
 }
 
-#dokuwiki__sitetools {
+[dir=rtl] #dokuwiki__sitetools {
     text-align: left;
 }
 
-#dokuwiki__aside ul, #dokuwiki__aside ol {
+[dir=rtl] #dokuwiki__aside ul, #dokuwiki__aside ol {
     padding-right: 0;
 }
 
-.dokuwiki .pageId {
+[dir=rtl] .dokuwiki .pageId {
     right: auto;
     left: -1em;
 }
 
-.dokuwiki .docInfo {
+[dir=rtl] .dokuwiki .docInfo {
     text-align: left;
 }
 
-.dokuwiki div.toolbar button.toolbutton:first-child {
+[dir=rtl] .dokuwiki div.toolbar button.toolbutton:first-child {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
     border-top-right-radius: 4px;
@@ -311,7 +319,7 @@ form#subscribe__form fieldset {
     border-left-width: 0;
     border-right-width: 1px;
 }
-.dokuwiki div.toolbar button.toolbutton:last-child {
+[dir=rtl] .dokuwiki div.toolbar button.toolbutton:last-child {
     border-top-left-radius: 4px;
     border-bottom-left-radius: 4px;
     border-top-right-radius: 0;
@@ -319,30 +327,30 @@ form#subscribe__form fieldset {
     border-left-width: 1px;
 }
 
-.dokuwiki div.section_highlight {
+[dir=rtl] .dokuwiki div.section_highlight {
     margin-right: -2em;
     border-right-width: 1em;
 }
 
-#dokuwiki__footer .license img {
+[dir=rtl] #dokuwiki__footer .license img {
     margin: 0 0 0 .5em;
 }
 
-.dokuwiki div.toc {
+[dir=rtl] .dokuwiki div.toc {
     margin: -2em 1.4em .5em -2em;
     border-left-width: 0;
     border-right: 1px solid __border__;
 }
-.dokuwiki #toc__inside ul {
+[dir=rtl] .dokuwiki #toc__inside ul {
     padding: 0 1.5em 0 0;
 }
 
-#dokuwiki__detail div.img_detail dl dt {
+[dir=rtl] #dokuwiki__detail div.img_detail dl dt {
     float: right;
     text-align: left;
     clear: right;
 }
-#dokuwiki__detail div.img_detail dl dd {
+[dir=rtl] #dokuwiki__detail div.img_detail dl dd {
     margin-left: 0;
     margin-right: 9.5em;
 }
@@ -350,142 +358,142 @@ form#subscribe__form fieldset {
 
 /*____________ pagetools ____________*/
 
-#dokuwiki__usertools {
+[dir=rtl] #dokuwiki__usertools {
     right: auto;
     left: 40px;
 }
 
-#dokuwiki__pagetools {
+[dir=rtl] #dokuwiki__pagetools {
     right: auto;
     left: -40px;
 }
 
-#dokuwiki__pagetools ul {
+[dir=rtl] #dokuwiki__pagetools ul {
     right: auto;
     left: 0;
     text-align: left;
 }
 
-#dokuwiki__pagetools ul li a {
+[dir=rtl] #dokuwiki__pagetools ul li a {
     padding: 5px 5px 5px 40px;
     background-position: left 0;
 }
 
-#dokuwiki__pagetools:hover ul,
-#dokuwiki__pagetools ul li a:focus {
+[dir=rtl] #dokuwiki__pagetools:hover ul,
+[dir=rtl] #dokuwiki__pagetools ul li a:focus {
     box-shadow: -2px 2px 2px __text_alt__;
 }
 
 /* all available icons in sprite */
-#dokuwiki__pagetools ul li a.edit {
+[dir=rtl] #dokuwiki__pagetools ul li a.edit {
     background-position: left 0;
 }
-#dokuwiki__pagetools ul li a.edit:hover,
-#dokuwiki__pagetools ul li a.edit:active,
-#dokuwiki__pagetools ul li a.edit:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.edit:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.edit:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.edit:focus {
     background-position: left -45px;
 }
 
-#dokuwiki__pagetools ul li a.create {
+[dir=rtl] #dokuwiki__pagetools ul li a.create {
     background-position: left -90px;
 }
-#dokuwiki__pagetools ul li a.create:hover,
-#dokuwiki__pagetools ul li a.create:active,
-#dokuwiki__pagetools ul li a.create:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.create:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.create:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.create:focus {
     background-position: left -135px;
 }
 
-#dokuwiki__pagetools ul li a.show {
+[dir=rtl] #dokuwiki__pagetools ul li a.show {
     background-position: left -270px;
 }
-#dokuwiki__pagetools ul li a.show:hover,
-#dokuwiki__pagetools ul li a.show:active,
-#dokuwiki__pagetools ul li a.show:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.show:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.show:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.show:focus {
     background-position: left -315px;
 }
 
-#dokuwiki__pagetools ul li a.source {
+[dir=rtl] #dokuwiki__pagetools ul li a.source {
     background-position: left -360px;
 }
-#dokuwiki__pagetools ul li a.source:hover,
-#dokuwiki__pagetools ul li a.source:active,
-#dokuwiki__pagetools ul li a.source:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.source:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.source:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.source:focus {
     background-position: left -405px;
 }
 
-#dokuwiki__pagetools ul li a.draft {
+[dir=rtl] #dokuwiki__pagetools ul li a.draft {
     background-position: left -180px;
 }
-#dokuwiki__pagetools ul li a.draft:hover,
-#dokuwiki__pagetools ul li a.draft:active,
-#dokuwiki__pagetools ul li a.draft:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.draft:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.draft:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.draft:focus {
     background-position: left -225px;
 }
 
-#dokuwiki__pagetools ul li a.revs {
+[dir=rtl] #dokuwiki__pagetools ul li a.revs {
     background-position: left -540px;
 }
-#dokuwiki__pagetools ul li a.revs:hover,
-#dokuwiki__pagetools ul li a.revs:active,
-#dokuwiki__pagetools ul li a.revs:focus,
-.mode_revisions #dokuwiki__pagetools ul li a.revs {
+[dir=rtl] #dokuwiki__pagetools ul li a.revs:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.revs:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.revs:focus,
+.mode_revisions [dir=rtl] #dokuwiki__pagetools ul li a.revs {
     background-position: left -585px;
 }
 
-#dokuwiki__pagetools ul li a.backlink {
+[dir=rtl] #dokuwiki__pagetools ul li a.backlink {
     background-position: left -630px;
 }
-#dokuwiki__pagetools ul li a.backlink:hover,
-#dokuwiki__pagetools ul li a.backlink:active,
-#dokuwiki__pagetools ul li a.backlink:focus,
-.mode_backlink #dokuwiki__pagetools ul li a.backlink {
+[dir=rtl] #dokuwiki__pagetools ul li a.backlink:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.backlink:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.backlink:focus,
+.mode_backlink [dir=rtl] #dokuwiki__pagetools ul li a.backlink {
     background-position: left -675px;
 }
 
-#dokuwiki__pagetools ul li a.top {
+[dir=rtl] #dokuwiki__pagetools ul li a.top {
     background-position: left -810px;
 }
-#dokuwiki__pagetools ul li a.top:hover,
-#dokuwiki__pagetools ul li a.top:active,
-#dokuwiki__pagetools ul li a.top:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.top:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.top:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.top:focus {
     background-position: left -855px;
 }
 
-#dokuwiki__pagetools ul li a.revert {
+[dir=rtl] #dokuwiki__pagetools ul li a.revert {
     background-position: left -450px;
 }
-#dokuwiki__pagetools ul li a.revert:hover,
-#dokuwiki__pagetools ul li a.revert:active,
-#dokuwiki__pagetools ul li a.revert:focus,
-.mode_revert #dokuwiki__pagetools ul li a.revert {
+[dir=rtl] #dokuwiki__pagetools ul li a.revert:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.revert:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.revert:focus,
+.mode_revert [dir=rtl] #dokuwiki__pagetools ul li a.revert {
     background-position: left -495px;
 }
 
-#dokuwiki__pagetools ul li a.subscribe {
+[dir=rtl] #dokuwiki__pagetools ul li a.subscribe {
     background-position: left -720px;
 }
-#dokuwiki__pagetools ul li a.subscribe:hover,
-#dokuwiki__pagetools ul li a.subscribe:active,
-#dokuwiki__pagetools ul li a.subscribe:focus,
-.mode_subscribe #dokuwiki__pagetools ul li a.subscribe {
+[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.subscribe:focus,
+.mode_subscribe [dir=rtl] #dokuwiki__pagetools ul li a.subscribe {
     background-position: left -765px;
 }
 
-#dokuwiki__pagetools ul li a.mediaManager {
+[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager {
     background-position: left -900px;
 }
-#dokuwiki__pagetools ul li a.mediaManager:hover,
-#dokuwiki__pagetools ul li a.mediaManager:active,
-#dokuwiki__pagetools ul li a.mediaManager:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.mediaManager:focus {
     background-position: left -945px;
 }
 
-#dokuwiki__pagetools ul li a.back {
+[dir=rtl] #dokuwiki__pagetools ul li a.back {
     background-position: left -990px;
 }
-#dokuwiki__pagetools ul li a.back:hover,
-#dokuwiki__pagetools ul li a.back:active,
-#dokuwiki__pagetools ul li a.back:focus {
+[dir=rtl] #dokuwiki__pagetools ul li a.back:hover,
+[dir=rtl] #dokuwiki__pagetools ul li a.back:active,
+[dir=rtl] #dokuwiki__pagetools ul li a.back:focus {
     background-position: left -1035px;
 }
 
@@ -493,26 +501,26 @@ form#subscribe__form fieldset {
 /*____________ content ____________*/
 
 /* section indenting
-.dokuwiki .page h1 {margin-left: 0; margin-right: 0;}
-.dokuwiki .page h2 {margin-left: 0; margin-right: .666em;}
-.dokuwiki .page h3 {margin-left: 0; margin-right: 1.776em;}
-.dokuwiki .page h4 {margin-left: 0; margin-right: 3em;}
-.dokuwiki .page h5 {margin-left: 0; margin-right: 4.5712em;}
-.dokuwiki .page div.level1 {margin-left: 0; margin-right: 0;}
-.dokuwiki .page div.level2 {margin-left: 0; margin-right: 1em;}
-.dokuwiki .page div.level3 {margin-left: 0; margin-right: 2em;}
-.dokuwiki .page div.level4 {margin-left: 0; margin-right: 3em;}
-.dokuwiki .page div.level5 {margin-left: 0; margin-right: 4em;}
+[dir=rtl] .dokuwiki .page h1 {margin-left: 0; margin-right: 0;}
+[dir=rtl] .dokuwiki .page h2 {margin-left: 0; margin-right: .666em;}
+[dir=rtl] .dokuwiki .page h3 {margin-left: 0; margin-right: 1.776em;}
+[dir=rtl] .dokuwiki .page h4 {margin-left: 0; margin-right: 3em;}
+[dir=rtl] .dokuwiki .page h5 {margin-left: 0; margin-right: 4.5712em;}
+[dir=rtl] .dokuwiki .page div.level1 {margin-left: 0; margin-right: 0;}
+[dir=rtl] .dokuwiki .page div.level2 {margin-left: 0; margin-right: 1em;}
+[dir=rtl] .dokuwiki .page div.level3 {margin-left: 0; margin-right: 2em;}
+[dir=rtl] .dokuwiki .page div.level4 {margin-left: 0; margin-right: 3em;}
+[dir=rtl] .dokuwiki .page div.level5 {margin-left: 0; margin-right: 4em;}
 */
 
-.dokuwiki dl.code dt,
-.dokuwiki dl.file dt {
+[dir=rtl] .dokuwiki dl.code dt,
+[dir=rtl] .dokuwiki dl.file dt {
     margin-left: 0;
     margin-right: 1em;
 }
 
-.JSpopup ul,
-.JSpopup ol {
+[dir=rtl] .JSpopup ul,
+[dir=rtl] .JSpopup ol {
     padding-right: 0;
 }
 
@@ -522,12 +530,12 @@ form#subscribe__form fieldset {
 @media only screen and (max-width: 768px), only screen and (max-device-width: 960px) {
 
 
-.hasSidebar #dokuwiki__content,
-.hasSidebar #dokuwiki__content > .pad {
+[dir=rtl] .hasSidebar #dokuwiki__content,
+[dir=rtl] .hasSidebar #dokuwiki__content > .pad {
     margin-right: 0;
 }
 
-.dokuwiki div.toc {
+[dir=rtl] .dokuwiki div.toc {
     float: none;
     margin: 0 0 1em 0;
     border-right-width: 0;
@@ -539,36 +547,36 @@ form#subscribe__form fieldset {
 @media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
 
 
-#dokuwiki__header ul.a11y.skip {
+[dir=rtl] #dokuwiki__header ul.a11y.skip {
     left: auto !important;
     right: 0 !important;
     float: left;
     padding-right: 0;
 }
-#dokuwiki__header ul.a11y.skip li {
+[dir=rtl] #dokuwiki__header ul.a11y.skip li {
     margin: 0 .35em 0 0;
 }
 
-#dokuwiki__header .headings,
-#dokuwiki__header .tools {
+[dir=rtl] #dokuwiki__header .headings,
+[dir=rtl] #dokuwiki__header .tools {
     float: none;
     text-align: right;
     width: auto;
 }
-#dokuwiki__sitetools {
+[dir=rtl] #dokuwiki__sitetools {
     text-align: right;
 }
 
-#dokuwiki__sitetools form.search {
+[dir=rtl] #dokuwiki__sitetools form.search {
     float: right;
     margin: 0 0 .2em .2em;
 }
 
-#dokuwiki__header .mobileTools {
+[dir=rtl] #dokuwiki__header .mobileTools {
     float: left;
 }
 
-.dokuwiki label.block {
+[dir=rtl] .dokuwiki label.block {
     text-align: right;
 }
 
diff --git a/lib/tpl/dokuwiki/style.ini b/lib/tpl/dokuwiki/style.ini
index 8ac4fbe31..b8e55bcc8 100644
--- a/lib/tpl/dokuwiki/style.ini
+++ b/lib/tpl/dokuwiki/style.ini
@@ -30,8 +30,8 @@ css/pagetools.css         = screen
 css/content.css           = screen
 css/includes.css          = screen
 css/mobile.css            = screen
+css/rtl.css               = screen
 
-css/rtl.css           = rtl
 css/print.css         = print
 
 
-- 
GitLab