From 6f01e26207ece54911ad14b6f13fca6c71605790 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 18 Jan 2011 18:20:54 +0000 Subject: [PATCH] - Patch #740182 by aspilicious, tsi, yoroy, casey, realityloop, Jeff Burnz: toolbar and shortcuts lack RTL styling. --- modules/shortcut/shortcut-rtl.css | 48 +++++++++++++++++++++++++++++++ modules/shortcut/shortcut.css | 24 +++++++--------- modules/toolbar/toolbar-rtl.css | 42 +++++++++++++++++++++++++++ modules/toolbar/toolbar.css | 12 ++++---- 4 files changed, 107 insertions(+), 19 deletions(-) create mode 100644 modules/shortcut/shortcut-rtl.css create mode 100644 modules/toolbar/toolbar-rtl.css diff --git a/modules/shortcut/shortcut-rtl.css b/modules/shortcut/shortcut-rtl.css new file mode 100644 index 000000000000..413fda1c7dd0 --- /dev/null +++ b/modules/shortcut/shortcut-rtl.css @@ -0,0 +1,48 @@ +/* $Id$ */ + +div#toolbar a#edit-shortcuts { + position: absolute; + left: 0; + top: 0; + padding: 5px 5px 5px 10px; +} +div#toolbar div.toolbar-shortcuts ul { + float: none; + margin-right: 5px; + margin-left: 10em; +} +div#toolbar div.toolbar-shortcuts ul li a { + margin-left: 5px; + margin-right: 0; + padding: 0 5px; +} +div#toolbar div.toolbar-shortcuts span.icon { + float: right; +} +div.add-or-remove-shortcuts a span.icon { + float: right; + margin-right: 8px; + margin-left: 0; +} +div.add-or-remove-shortcuts a span.text { + float: right; + padding-right: 10px; + padding-left: 0; +} +div.add-or-remove-shortcuts a:hover span.text { + -moz-border-radius: 5px 0 0 5px; + -webkit-border-top-left-radius: 5px; + -webkit-border-bottom-left-radius: 5px; + border-radius: 5px 0 0 5px; + padding-left: 6px; +} +#shortcut-set-switch .form-item-new { + padding-right: 17px; + padding-left: 0; +} +div.add-shortcut a:hover span.icon { + background-position: 0 -24px; +} +div.remove-shortcut a:hover span.icon { + background-position: -12px -24px; +} diff --git a/modules/shortcut/shortcut.css b/modules/shortcut/shortcut.css index a0d8204c88bc..67c42e4cb10d 100644 --- a/modules/shortcut/shortcut.css +++ b/modules/shortcut/shortcut.css @@ -16,13 +16,13 @@ div#toolbar div.toolbar-shortcuts ul { padding: 5px 0 2px 0; height: 28px; line-height: 24px; - float: left; - margin-left:5px; + float: left; /* LTR */ + margin-left:5px; /* LTR */ } div#toolbar div.toolbar-shortcuts ul li a { padding: 0 5px 0 5px; - margin-right: 5px; + margin-right: 5px; /* LTR */ -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; @@ -40,11 +40,11 @@ div#toolbar div.toolbar-shortcuts ul li a.active { } div#toolbar div.toolbar-shortcuts span.icon { - float: left; + float: left; /* LTR */ background: #444; width: 30px; height: 30px; - margin-right: 5px; + margin-right: 5px; /* LTR */ -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; @@ -88,14 +88,12 @@ div.add-or-remove-shortcuts a:hover span.text { color: #fff; background-color: #5f605b; display: block; - padding-right: 6px; + padding-right: 6px; /* LTR */ cursor: pointer; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-topright: 5px; - -webkit-border-bottom-right-radius: 5px; - -webkit-border-top-right-radius: 5px; - border-bottom-right-radius: 5px; - border-top-right-radius: 5px; + -moz-border-radius: 0 5px 5px 0; /* LTR */ + -webkit-border-top-right-radius: 5px; /* LTR */ + -webkit-border-bottom-right-radius: 5px; /* LTR */ + border-radius: 0 5px 5px 0; /* LTR */ } #shortcut-set-switch .form-type-radios { @@ -105,5 +103,5 @@ div.add-or-remove-shortcuts a:hover span.text { #shortcut-set-switch .form-item-new { padding-top: 0; - padding-left: 17px; + padding-left: 17px; /* LTR */ } diff --git a/modules/toolbar/toolbar-rtl.css b/modules/toolbar/toolbar-rtl.css new file mode 100644 index 000000000000..35129fcb20e3 --- /dev/null +++ b/modules/toolbar/toolbar-rtl.css @@ -0,0 +1,42 @@ +/* $Id$ */ + +#toolbar, +#toolbar * { + text-align: right; +} +#toolbar ul li { + float: right; +} +#toolbar ul li a { + float: none; + display: inline-block; + zoom: 1; +} +#toolbar div.toolbar-menu { + padding: 5px 50px 5px 50px; +} +#toolbar-user { + float: left; +} +#toolbar ul#toolbar-user li { + display: inline; + float: none; +} +#toolbar-menu { + float: none; +} +#toolbar-home { + float: right; +} +#toolbar ul li.home a { + position: absolute; + right: 10px; +} +#toolbar div.toolbar-menu a.toggle { + left: 10px; + right: auto; +} +* html #toolbar { + left: 0; + padding-left: 0; +} diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css index d03454e41bf4..0af1108dc5c5 100644 --- a/modules/toolbar/toolbar.css +++ b/modules/toolbar/toolbar.css @@ -21,7 +21,7 @@ body.toolbar-drawer { font-size: 100%; vertical-align: baseline; line-height: inherit; - text-align: left; + text-align: left; /* LTR */ list-style: none; } @@ -62,7 +62,7 @@ body.toolbar-drawer { #toolbar ul li, #toolbar ul li a { - float: left; + float: left; /* LTR */ } /** @@ -71,7 +71,7 @@ body.toolbar-drawer { #toolbar div.toolbar-menu { background: #000; line-height: 20px; - padding: 5px 50px 5px 10px; + padding: 5px 50px 5px 10px; /* LTR */ position: relative; } @@ -86,16 +86,16 @@ body.toolbar-drawer { } #toolbar-user { - float: right; + float: right; /* LTR */ } #toolbar-menu { - float: left; + float: left; /* LTR */ } #toolbar div.toolbar-menu a.toggle { position: absolute; - right: 10px; + right: 10px; /* LTR */ bottom: 0; cursor: pointer; background: url(toolbar.png) 0 -20px no-repeat; -- GitLab