diff --git a/core/includes/theme.inc b/core/includes/theme.inc index a07cae3..ed6c3c9 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -3092,7 +3092,6 @@ function template_process_maintenance_page(&$variables) { // selected should result in RTL stylesheets loaded properly already. $variables['css'] = $css = drupal_add_css(); include_once DRUPAL_ROOT . '/core/modules/language/language.module'; - language_css_alter($css); $variables['styles'] = drupal_get_css($css); $variables['scripts'] = drupal_get_js(); diff --git a/core/misc/dropbutton/dropbutton-rtl.css b/core/misc/dropbutton/dropbutton-rtl.css deleted file mode 100644 index d677c84..0000000 --- a/core/misc/dropbutton/dropbutton-rtl.css +++ /dev/null @@ -1,21 +0,0 @@ - -/** - * @file - * Base RTL styles for dropbuttons. - */ - -/** - * The dropbutton arrow. - */ -.dropbutton-toggle { - left: 0; - right: auto; -} -.dropbutton-arrow { - left: 0.6667em; - right: auto; -} -.js .dropbutton-multiple .dropbutton-widget { - padding-left: 2em; - padding-right: 0; -} diff --git a/core/misc/dropbutton/dropbutton.css b/core/misc/dropbutton/dropbutton.css index 35e9692..98f6e5d 100644 --- a/core/misc/dropbutton/dropbutton.css +++ b/core/misc/dropbutton/dropbutton.css @@ -66,6 +66,10 @@ .js .dropbutton-multiple .dropbutton-widget { padding-right: 2em; /* LTR */ } +.js[dir=rtl] .dropbutton-multiple .dropbutton-widget { + padding-left: 2em; + padding-right: 0; +} .dropbutton-multiple.open, .dropbutton-multiple.open .dropbutton-widget { max-width: none; @@ -89,6 +93,10 @@ white-space: nowrap; width: 2em; } +[dir=rtl] .dropbutton-toggle { + left: 0; + right: auto; +} .dropbutton-toggle button { background: none; border: 0; @@ -115,6 +123,10 @@ width: 0; overflow: hidden; } +[dir=rtl] .dropbutton-arrow { + left: 0.6667em; + right: auto; +} .dropbutton-multiple.open .dropbutton-arrow { border-bottom: 0.3333em solid; border-top-color: transparent; diff --git a/core/misc/dropbutton/dropbutton.theme-rtl.css b/core/misc/dropbutton/dropbutton.theme-rtl.css deleted file mode 100644 index 3e0fd7f..0000000 --- a/core/misc/dropbutton/dropbutton.theme-rtl.css +++ /dev/null @@ -1,14 +0,0 @@ - -/** - * @file - * General RTL styles for dropbuttons. - */ - -.dropbutton-multiple .dropbutton { - border-left: 1px solid #e8e8e8; - border-right: 0 none; -} -.dropbutton-multiple .dropbutton li > * { - margin-left: 0.25em; - margin-right: 0; -} diff --git a/core/misc/dropbutton/dropbutton.theme.css b/core/misc/dropbutton/dropbutton.theme.css index c0a347f..757957a 100644 --- a/core/misc/dropbutton/dropbutton.theme.css +++ b/core/misc/dropbutton/dropbutton.theme.css @@ -21,6 +21,14 @@ .dropbutton-multiple .dropbutton { border-right: 1px solid #e8e8e8; /* LTR */ } +[dir=rtl] .dropbutton-multiple .dropbutton { + border-left: 1px solid #e8e8e8; + border-right: 0 none; +} .dropbutton-multiple .dropbutton .dropbutton-action > * { margin-right: 0.25em; /* LTR */ } +[dir=rtl] .dropbutton-multiple .dropbutton .dropbutton-action > * { + margin-left: 0.25em; + margin-right: 0; +} diff --git a/core/misc/print-rtl.css b/core/misc/print-rtl.css deleted file mode 100644 index f99287a..0000000 --- a/core/misc/print-rtl.css +++ /dev/null @@ -1,7 +0,0 @@ - -body { - direction: rtl; -} -th { - text-align: right; -} diff --git a/core/misc/print.css b/core/misc/print.css index 0a56ef1..8ebc0cc 100644 --- a/core/misc/print.css +++ b/core/misc/print.css @@ -3,11 +3,17 @@ body { margin: 1em; background-color: #fff; } +[dir=rtl] body { + direction: rtl; +} th { text-align: left; /* LTR */ color: #006; border-bottom: 1px solid #ccc; } +[dir=rtl] th { + text-align: right; +} tr.odd { background-color: #ddd; } diff --git a/core/misc/vertical-tabs-rtl.css b/core/misc/vertical-tabs-rtl.css deleted file mode 100644 index e83b958..0000000 --- a/core/misc/vertical-tabs-rtl.css +++ /dev/null @@ -1,14 +0,0 @@ - -.vertical-tabs { - margin-left: 0; - margin-right: 15em; -} -.vertical-tabs-list { - float: right; - margin-left: 0; - margin-right: -15em; -} -.vertical-tab-button.selected { - border-left-width: 0; - border-right-width: 1px; -} diff --git a/core/misc/vertical-tabs.css b/core/misc/vertical-tabs.css index 9ea579a..827c8f8 100644 --- a/core/misc/vertical-tabs.css +++ b/core/misc/vertical-tabs.css @@ -3,6 +3,10 @@ margin: 1em 0 1em 15em; /* LTR */ border: 1px solid #ccc; } +[dir=rtl] .vertical-tabs { + margin-left: 0; + margin-right: 15em; +} .vertical-tabs-list { float: left; /* LTR */ width: 15em; @@ -11,6 +15,11 @@ border-top: 1px solid #ccc; list-style: none; } +[dir=rtl] .vertical-tabs-list { + float: right; + margin-left: 0; + margin-right: -15em; +} .vertical-tabs-pane { margin: 0; border: 0; @@ -44,6 +53,10 @@ border-right-width: 0; /* LTR */ background-color: #fff; } +[dir=rtl] .vertical-tab-button.selected { + border-left-width: 0; + border-right-width: 1px; +} .vertical-tab-button.selected strong { color: #000; } diff --git a/core/modules/book/css/book.theme-rtl.css b/core/modules/book/css/book.theme-rtl.css deleted file mode 100644 index 381a4cc..0000000 --- a/core/modules/book/css/book.theme-rtl.css +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file - * Right-to-Left styling for the Book module. - */ - -/** - * Book navigation. - */ -.book-pager .previous { - float: right; - text-align: right; -} -.book-pager .next { - float: left; - text-align: left; -} diff --git a/core/modules/book/css/book.theme.css b/core/modules/book/css/book.theme.css index f1da027..a63ee41 100644 --- a/core/modules/book/css/book.theme.css +++ b/core/modules/book/css/book.theme.css @@ -24,6 +24,10 @@ text-align: left; /* LTR */ width: 45%; } +[dir=rtl] .book-pager .previous { + float: right; + text-align: right; +} .book-pager .up { text-align: center; width: 8%; @@ -33,3 +37,7 @@ text-align: right; /* LTR */ width: 45%; } +[dir=rtl] .book-pager .next { + float: left; + text-align: left; +} diff --git a/core/modules/ckeditor/css/ckeditor.admin-rtl.css b/core/modules/ckeditor/css/ckeditor.admin-rtl.css deleted file mode 100644 index 548a4f9..0000000 --- a/core/modules/ckeditor/css/ckeditor.admin-rtl.css +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file - * Styles for configuration of CKEditor module for right-to-left languages. - */ - -.ckeditor-toolbar-active > ul { - clear: right; - float: right; -} - -ul.ckeditor-buttons li { - float: right; -} - -ul.ckeditor-buttons li:first-child a { - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} -ul.ckeditor-buttons li:last-child a { - border-top-left-radius: 2px; - border-bottom-left-radius: 2px; -} -ul.ckeditor-multiple-buttons { - float: right; -} -ul.ckeditor-multiple-buttons li { - float: right; -} - -.ckeditor-row-controls { - float: left; - text-align: left; -} diff --git a/core/modules/ckeditor/css/ckeditor.admin.css b/core/modules/ckeditor/css/ckeditor.admin.css index 272e3ea..432791c 100644 --- a/core/modules/ckeditor/css/ckeditor.admin.css +++ b/core/modules/ckeditor/css/ckeditor.admin.css @@ -24,6 +24,10 @@ clear: left; /* LTR */ float: left; /* LTR */ } +[dir=rtl] .ckeditor-toolbar-active > ul { + clear: right; + float: right; +} #ckeditor-button-description { margin-bottom: 1em; } @@ -61,6 +65,9 @@ ul.ckeditor-buttons li { margin: 0; float: left; /* LTR */ } +[dir=rtl] ul.ckeditor-buttons li { + float: right; +} ul.ckeditor-buttons li a { position: relative; display: block; @@ -92,10 +99,18 @@ ul.ckeditor-buttons li:first-child a { border-top-left-radius: 2px; /* LTR */ border-bottom-left-radius: 2px; /* LTR */ } +[dir=rtl] ul.ckeditor-buttons li:first-child a { + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; +} ul.ckeditor-buttons li:last-child a { border-top-right-radius: 2px; /* LTR */ border-bottom-right-radius: 2px; /* LTR */ } +[dir=rtl] ul.ckeditor-buttons li:last-child a { + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; +} ul.ckeditor-buttons li.ckeditor-button-placeholder a { background: #333; opacity: 0.3; @@ -106,12 +121,18 @@ ul.ckeditor-multiple-buttons { list-style: none; float: left; /* LTR */ } +[dir=rtl] ul.ckeditor-multiple-buttons { + float: right; +} ul.ckeditor-multiple-buttons li { display: inline-block; float: left; /* LTR */ margin: 0; padding: 0; } +[dir=rtl] ul.ckeditor-multiple-buttons li { + float: right; +} ul.ckeditor-multiple-buttons li a { cursor: move; display: inline-block; @@ -176,6 +197,10 @@ ul.ckeditor-multiple-buttons li.ckeditor-button-separator a { width: 40px; text-align: right; /* LTR */ } +[dir=rtl] .ckeditor-row-controls { + float: left; + text-align: left; +} .ckeditor-row-controls a { display: inline-block; padding: 6px 2px; diff --git a/core/modules/color/css/color.admin-rtl.css b/core/modules/color/css/color.admin-rtl.css deleted file mode 100644 index f8dbbd5..0000000 --- a/core/modules/color/css/color.admin-rtl.css +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @file - * Right-to-left specific stylesheet for the Color module. - */ - -#placeholder { - left: 0; - right: auto; -} - -/* Palette */ -.color-form .form-item { - padding-left: 0; - padding-right: 1em; -} -.color-form label { - float: right; - clear: right; -} -.color-form .form-text, -.color-form .form-select { - float: right; -} -.color-form .form-text { - margin-right: 0; - margin-left: 5px; -} -#palette .hook { - float: right; -} -#palette .down, -#palette .up, -#palette .both { - background: url(../images/hook-rtl.png) no-repeat 0 0; -} -#palette .up { - background-position: 0 -27px; -} -#palette .both { - background-position: 0 -54px; -} -#palette .lock { - float: right; - right: -10px; -} -.js #preview { - float: right; -} diff --git a/core/modules/color/css/color.admin.css b/core/modules/color/css/color.admin.css index 98e9cc2..c3b471b 100644 --- a/core/modules/color/css/color.admin.css +++ b/core/modules/color/css/color.admin.css @@ -13,6 +13,10 @@ top: 0; right: 0; /* LTR */ } +[dir=rtl] #placeholder { + left: 0; + right: auto; +} /* Palette */ .color-form .form-item { @@ -21,21 +25,36 @@ padding-left: 1em; /* LTR */ margin: 0.5em 0; } +[dir=rtl] .color-form .form-item { + padding-left: 0; + padding-right: 1em; +} .color-form label { float: left; /* LTR */ clear: left; /* LTR */ width: 10em; } +[dir=rtl] .color-form label { + float: right; + clear: right; +} .color-form .form-text, .color-form .form-select { float: left; /* LTR */ } +[dir=rtl] .color-form .form-text, +[dir=rtl] .color-form .form-select { + float: right; +} .color-form .form-text { text-align: center; margin-right: 5px; /* LTR */ cursor: pointer; } - +[dir=rtl] .color-form .form-text { + margin-right: 0; + margin-left: 5px; +} #palette .hook { float: left; /* LTR */ margin-top: 3px; @@ -47,13 +66,23 @@ #palette .both { background: url(../images/hook.png) no-repeat 100% 0; /* LTR */ } +[dir=rtl] #palette .down, +[dir=rtl] #palette .up, +[dir=rtl] #palette .both { + background: url(images/hook-rtl.png) no-repeat 0 0; +} #palette .up { background-position: 100% -27px; /* LTR */ } +[dir=rtl] #palette .up { + background-position: 0 -27px; +} #palette .both { background-position: 100% -54px; /* LTR */ } - +[dir=rtl] #palette .both { + background-position: 0 -54px; +} #palette .lock { float: left; /* LTR */ position: relative; @@ -64,6 +93,10 @@ background: url(../images/lock.png) no-repeat 50% 2px; cursor: pointer; } +[dir=rtl] #palette .lock { + float: right; + right: -10px; +} #palette .unlocked { background-position: 50% -22px; } @@ -83,3 +116,6 @@ position: relative; float: left; /* LTR */ } +.js[dir=rtl] #preview { + float: right; +} diff --git a/core/modules/comment/css/comment.theme-rtl.css b/core/modules/comment/css/comment.theme-rtl.css deleted file mode 100644 index c121023..0000000 --- a/core/modules/comment/css/comment.theme-rtl.css +++ /dev/null @@ -1,13 +0,0 @@ - -/** - * @file - * RTL styles for comment module. - */ - -/** - * Indent threaded comments. - */ -.indented { - margin-left: 0; - margin-right: 25px; -} diff --git a/core/modules/comment/css/comment.theme.css b/core/modules/comment/css/comment.theme.css index 6a32a63..51fd293 100644 --- a/core/modules/comment/css/comment.theme.css +++ b/core/modules/comment/css/comment.theme.css @@ -10,3 +10,7 @@ .indented { margin-left: 25px; /* LTR */ } +[dir=rtl] .indented { + margin-left: 0; + margin-right: 25px; +} diff --git a/core/modules/contextual/css/contextual.theme-rtl.css b/core/modules/contextual/css/contextual.theme-rtl.css deleted file mode 100644 index c001e31..0000000 --- a/core/modules/contextual/css/contextual.theme-rtl.css +++ /dev/null @@ -1,32 +0,0 @@ -/** - * @file - * RTL styling for contextual module. - */ - -/** - * Contextual links wrappers. - */ -.contextual { - left: 0; - right: auto; -} - -/** - * Contextual trigger. - */ -.contextual .trigger { - float: left; - right: auto; - left: 2px; -} - -/** - * Contextual links. - */ -.contextual-region .contextual .contextual-links { - border-radius: 0 4px 4px 4px; - float: left; - left: 2px; - right: auto; - text-align: right; -} diff --git a/core/modules/contextual/css/contextual.theme.css b/core/modules/contextual/css/contextual.theme.css index a371afa..1387744 100644 --- a/core/modules/contextual/css/contextual.theme.css +++ b/core/modules/contextual/css/contextual.theme.css @@ -12,6 +12,10 @@ top: 2px; z-index: 500; } +[dir=rtl] .contextual { + left: 0; + right: auto; +} /** * Contextual region. @@ -47,6 +51,11 @@ text-indent: -9999px; cursor: pointer; } +[dir=rtl] .contextual .trigger { + float: left; + right: auto; + left: 2px; +} .contextual.open .trigger { border-bottom-color: transparent; border-radius: 13px 13px 0 0; @@ -73,6 +82,13 @@ top: -1px; white-space: nowrap; } +[dir=rtl] .contextual-region .contextual .contextual-links { + border-radius: 0 4px 4px 4px; + float: left; + left: 2px; + right: auto; + text-align: right; +} .contextual-region .contextual .contextual-links li { background-color: #fff; border: none; diff --git a/core/modules/contextual/css/contextual.toolbar-rtl.css b/core/modules/contextual/css/contextual.toolbar-rtl.css deleted file mode 100644 index 226969f..0000000 --- a/core/modules/contextual/css/contextual.toolbar-rtl.css +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @file - * RTL styling for contextual module's toolbar tab. - */ - -.js .toolbar .bar .contextual-toolbar-tab.tab { - float: left; -} -.js .toolbar .bar .contextual-toolbar-tab button { - padding-right: 1.3333em; -} diff --git a/core/modules/contextual/css/contextual.toolbar.css b/core/modules/contextual/css/contextual.toolbar.css index 72baa68..b4fcd1f 100644 --- a/core/modules/contextual/css/contextual.toolbar.css +++ b/core/modules/contextual/css/contextual.toolbar.css @@ -16,6 +16,9 @@ .js .toolbar .bar .contextual-toolbar-tab.tab { float: right; /* LTR */ } +.js[dir=rtl] .toolbar .bar .contextual-toolbar-tab.tab { + float: left; +} .js .toolbar .bar .contextual-toolbar-tab button { padding-bottom: 1em; padding-top: 1em; @@ -24,6 +27,9 @@ text-indent: -9999px; line-height: 1em; } +.js[dir=rtl] .toolbar .bar .contextual-toolbar-tab button { + padding-right: 1.3333em; +} .js .toolbar .bar .contextual-toolbar-tab button.active { background-image:-moz-linear-gradient(rgb(78,159,234) 0%,rgb(69,132,221) 100%); background-image:-webkit-gradient(linear,color-stop(0, rgb(78,159,234)),color-stop(1, rgb(69,132,221))); diff --git a/core/modules/dblog/css/dblog.module-rtl.css b/core/modules/dblog/css/dblog.module-rtl.css deleted file mode 100644 index 7326fa8..0000000 --- a/core/modules/dblog/css/dblog.module-rtl.css +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @file - * Right-to-Left styling for the Database Logging module. - */ - -.dblog-filter-form .form-item-type, -.dblog-filter-form .form-item-severity { - margin: .1em .1em .1em .9em; -} diff --git a/core/modules/dblog/css/dblog.module.css b/core/modules/dblog/css/dblog.module.css index 5732388..66ce59a 100644 --- a/core/modules/dblog/css/dblog.module.css +++ b/core/modules/dblog/css/dblog.module.css @@ -2,13 +2,16 @@ * @file * Admin styles for the Database Logging module. */ - .dblog-filter-form .form-item-type, .dblog-filter-form .form-item-severity { display: inline-block; margin: .1em .9em .1em .1em; /* LTR */ max-width: 30%; } +[dir=rtl] .dblog-filter-form .form-item-type, +[dir=rtl] .dblog-filter-form .form-item-severity { + margin: .1em .1em .1em .9em; +} .dblog-filter-form .form-actions { display: inline-block; padding: 3ex 0 0; diff --git a/core/modules/entity_reference/css/entity_reference.admin-rtl.css b/core/modules/entity_reference/css/entity_reference.admin-rtl.css deleted file mode 100644 index 3302ab8..0000000 --- a/core/modules/entity_reference/css/entity_reference.admin-rtl.css +++ /dev/null @@ -1,4 +0,0 @@ - -.entity_reference-settings { - margin-right: 1.5em; -} diff --git a/core/modules/entity_reference/css/entity_reference.admin.css b/core/modules/entity_reference/css/entity_reference.admin.css index d608ccf..8c6c382 100644 --- a/core/modules/entity_reference/css/entity_reference.admin.css +++ b/core/modules/entity_reference/css/entity_reference.admin.css @@ -2,3 +2,6 @@ .entity_reference-settings { margin-left: 1.5em; /* LTR */ } +[dir=rtl] .entity_reference-settings { + margin-right: 1.5em; +} diff --git a/core/modules/field/css/field.module-rtl.css b/core/modules/field/css/field.module-rtl.css deleted file mode 100644 index 4c2dec9..0000000 --- a/core/modules/field/css/field.module-rtl.css +++ /dev/null @@ -1,10 +0,0 @@ -form .field-multiple-table .field-multiple-drag { - padding-left: 0; -} -form .field-multiple-table .field-multiple-drag .tabledrag-handle{ - padding-left: .5em; -} -.field-label-inline .field-label, -.field-label-inline .field-items { - float: right; -} diff --git a/core/modules/field/css/field.module.css b/core/modules/field/css/field.module.css index 2ec03af..aa8e9d3 100644 --- a/core/modules/field/css/field.module.css +++ b/core/modules/field/css/field.module.css @@ -7,6 +7,10 @@ .field-label-inline .field-items { float:left; /*LTR*/ } +[dir=rtl] .field-label-inline .field-label, +[dir=rtl] .field-label-inline .field-items { + float: right; +} /* Form display */ form .field-edit-link { @@ -19,10 +23,15 @@ form .field-multiple-table .field-multiple-drag { width: 30px; padding-right: 0; /*LTR*/ } +[dir=rtl] form .field-multiple-table .field-multiple-drag { + padding-left: 0; +} form .field-multiple-table .field-multiple-drag .tabledrag-handle { padding-right: .5em; /*LTR*/ } - +[dir=rtl] form .field-multiple-table .field-multiple-drag .tabledrag-handle{ + padding-left: .5em; +} form .field-add-more-submit { margin: .5em 0 0; } diff --git a/core/modules/field_ui/css/field_ui.admin-rtl.css b/core/modules/field_ui/css/field_ui.admin-rtl.css deleted file mode 100644 index 3b50ab3..0000000 --- a/core/modules/field_ui/css/field_ui.admin-rtl.css +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @file - * Right-to-left specific stylesheet for the Field UI module. - */ - -/* 'Manage fields' overview */ -.field-ui-overview .add-new .label-input { - float: right; -} diff --git a/core/modules/field_ui/css/field_ui.admin.css b/core/modules/field_ui/css/field_ui.admin.css index cf59695..d58e46e 100644 --- a/core/modules/field_ui/css/field_ui.admin.css +++ b/core/modules/field_ui/css/field_ui.admin.css @@ -7,6 +7,9 @@ .field-ui-overview .add-new .label-input { float: left; /* LTR */ } +[dir=rtl] .field-ui-overview .add-new .label-input { + float: right; +} .field-ui-overview .add-new .tabledrag-changed { display: none; } diff --git a/core/modules/filter/css/filter.admin-rtl.css b/core/modules/filter/css/filter.admin-rtl.css deleted file mode 100644 index 4d972e2..0000000 --- a/core/modules/filter/css/filter.admin-rtl.css +++ /dev/null @@ -1,23 +0,0 @@ - -/** - * @file - * Right-to-Left administrative styling for the Filter module. - */ - -/** - * Filter information under field. - */ -.filter-help { - float: left; -} -.filter-help a { - background-position: left center; - padding: 0 0 0 20px; -} - -/** - * Improve filter tips position. - */ -.tips { - padding-right: 0; -} diff --git a/core/modules/filter/css/filter.admin.css b/core/modules/filter/css/filter.admin.css index ac21686..09ed0e0 100644 --- a/core/modules/filter/css/filter.admin.css +++ b/core/modules/filter/css/filter.admin.css @@ -27,6 +27,9 @@ .filter-help { float: right; /* LTR */ } +[dir=rtl] .filter-help { + float: left; +} .filter-help p { margin: 0; } @@ -34,6 +37,10 @@ background: transparent url(../../../misc/help.png) right center no-repeat; /* LTR */ padding: 0 20px 0 0; /* LTR */ } +[dir=rtl] .filter-help a { + background-position: left center; + padding: 0 0 0 20px; +} .text-format-wrapper .description { margin-top: 0.5em; @@ -52,3 +59,6 @@ .tips { padding-left: 0; /* LTR */ } +[dir=rtl] .tips { + padding-right: 0; +} diff --git a/core/modules/forum/css/forum.module-rtl.css b/core/modules/forum/css/forum.module-rtl.css deleted file mode 100644 index 0e5d3ed..0000000 --- a/core/modules/forum/css/forum.module-rtl.css +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file - * Right-to-left styling for the Forum module. - */ - -#forum .icon { - float: right; - margin: 0 0 0 9px; -} -#forum div.indent { - margin-left: 0; - margin-right: 20px; -} -.forum-topic-navigation { - padding: 1em 3em 0 0; -} -.forum-topic-navigation .topic-previous { - text-align: left; - float: right; -} -.forum-topic-navigation .topic-next { - text-align: right; - float: left; -} diff --git a/core/modules/forum/css/forum.module.css b/core/modules/forum/css/forum.module.css index 0c4f8fc..3afc98a 100644 --- a/core/modules/forum/css/forum.module.css +++ b/core/modules/forum/css/forum.module.css @@ -23,12 +23,20 @@ margin: 0 9px 0 0; /* LTR */ width: 24px; } +[dir=rtl] #forum .icon { + float: right; + margin: 0 0 0 9px; +} #forum .title { overflow: hidden; } #forum div.indent { margin-left: 20px; /* LTR */ } +[dir=rtl] #forum div.indent { + margin-left: 0; + margin-right: 20px; +} #forum .topic-status-new { background-position: -24px 0; @@ -45,3 +53,15 @@ #forum .topic-status-closed { background-position: -120px 0; } + +[dir=rtl] .forum-topic-navigation { + padding: 1em 3em 0 0; +} +[dir=rtl] .forum-topic-navigation .topic-previous { + text-align: left; + float: right; +} +[dir=rtl] .forum-topic-navigation .topic-next { + text-align: right; + float: left; +} diff --git a/core/modules/help/css/help.module-rtl.css b/core/modules/help/css/help.module-rtl.css deleted file mode 100644 index 035d5d2..0000000 --- a/core/modules/help/css/help.module-rtl.css +++ /dev/null @@ -1,10 +0,0 @@ - -.help-items { - float: right; - margin-right: 0; - margin-left: 3%; -} -.help-items-last { - margin-right: 0; - margin-left: 0; -} diff --git a/core/modules/help/css/help.module.css b/core/modules/help/css/help.module.css index 5d074c8..e65e1cd 100644 --- a/core/modules/help/css/help.module.css +++ b/core/modules/help/css/help.module.css @@ -4,9 +4,19 @@ width: 22%; margin-right: 3%; /* LTR */ } +[dir=rtl] .help-items { + float: right; + margin-right: 0; + margin-left: 3%; +} .help-items-last { margin-right: 0; /* LTR */ } +[dir=rtl] .help-items-last { + margin-right: 0; + margin-left: 0; +} + /** * Avoid text overlapping on a narrow viewport. diff --git a/core/modules/image/css/image.theme-rtl.css b/core/modules/image/css/image.theme-rtl.css deleted file mode 100644 index facb97b..0000000 --- a/core/modules/image/css/image.theme-rtl.css +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * Image upload widget. - */ -.image-preview { - float: right; - padding: 0 0 10px 10px; -} -.image-widget-data { - float: right; -} diff --git a/core/modules/image/css/image.theme.css b/core/modules/image/css/image.theme.css index 9f7d534..4a3045d 100644 --- a/core/modules/image/css/image.theme.css +++ b/core/modules/image/css/image.theme.css @@ -6,9 +6,16 @@ float: left; /* LTR */ padding: 0 10px 10px 0; /* LTR */ } +[dir=rtl] .image-preview { + float: right; + padding: 0 0 10px 10px; +} .image-widget-data { float: left; /* LTR */ } +[dir=rtl] .image-widget-data { + float: right; +} .image-widget-data .text-field { width: auto; } diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 6b45fa1..04809f4 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -562,33 +562,6 @@ function language_delete($langcode) { } /** - * Implements hook_css_alter(). - * - * This function checks all CSS files currently added via drupal_add_css() and - * and checks to see if a related right to left CSS file should be included. - */ -function language_css_alter(&$css) { - $language_interface = language(Language::TYPE_INTERFACE); - - // If the current language is RTL, add the CSS file with the RTL overrides. - if ($language_interface->direction == Language::DIRECTION_RTL) { - foreach ($css as $data => $item) { - // Only provide RTL overrides for files. - if ($item['type'] == 'file') { - $rtl_path = str_replace('.css', '-rtl.css', $item['data']); - if (file_exists($rtl_path) && !isset($css[$rtl_path])) { - // Replicate the same item, but with the RTL path and a little larger - // weight so that it appears directly after the original CSS file. - $item['data'] = $rtl_path; - $item['weight'] += 0.01; - $css[$rtl_path] = $item; - } - } - } - } -} - -/** * Implements hook_language_types_info(). * * Defines the three core language types: diff --git a/core/modules/layout/layouts/static/twocol/two-col-rtl.css b/core/modules/layout/layouts/static/twocol/two-col-rtl.css deleted file mode 100644 index 0fe6a0a..0000000 --- a/core/modules/layout/layouts/static/twocol/two-col-rtl.css +++ /dev/null @@ -1,6 +0,0 @@ -/* Large resolutions (desktop, tablets in landscape, ...) */ -@media only screen and (min-width: 59em) { - .layout-two-col .layout-region { - float: right; - } -} diff --git a/core/modules/layout/layouts/static/twocol/two-col.css b/core/modules/layout/layouts/static/twocol/two-col.css index bb7ae25..dfe92b3 100644 --- a/core/modules/layout/layouts/static/twocol/two-col.css +++ b/core/modules/layout/layouts/static/twocol/two-col.css @@ -4,4 +4,7 @@ float: left; /* LTR */ width: 50%; } + [dir=rtl] .layout-two-col .layout-region { + float: right; + } } diff --git a/core/modules/locale/css/locale.admin-rtl.css b/core/modules/locale/css/locale.admin-rtl.css deleted file mode 100644 index 0b78f1b..0000000 --- a/core/modules/locale/css/locale.admin-rtl.css +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @file - * CSS for the Locale module for right-to-left languages. - */ - -.locale-translate-filter-form .form-item-langcode, -.locale-translate-filter-form .form-item-translation, -.locale-translate-filter-form .form-item-customized { - float: right; - margin-left: 1em; - margin-right: 0; -} -.locale-translate-filter-form .form-actions { - float: right; - padding: 3.5ex 0 0 0; -} diff --git a/core/modules/locale/css/locale.admin.css b/core/modules/locale/css/locale.admin.css index d7bd328..8bc260d 100644 --- a/core/modules/locale/css/locale.admin.css +++ b/core/modules/locale/css/locale.admin.css @@ -14,6 +14,13 @@ */ width: 15em; } +[dir=rtl] .locale-translate-filter-form .form-item-langcode, +[dir=rtl] .locale-translate-filter-form .form-item-translation, +[dir=rtl] .locale-translate-filter-form .form-item-customized { + float: right; + margin-left: 1em; + margin-right: 0; +} .locale-translate-filter-form .form-type-select select { width: 100%; } @@ -21,6 +28,10 @@ float: left; /* LTR */ padding: 3.8ex 0 0 0; /* LTR */ } +[dir=rtl] .locale-translate-filter-form .form-actions { + float: right; + padding: 3.5ex 0 0 0; +} .locale-translate-edit-form th { width: 50%; table-layout: fixed; diff --git a/core/modules/overlay/css/overlay-child-rtl.css b/core/modules/overlay/css/overlay-child-rtl.css deleted file mode 100644 index 0751b56..0000000 --- a/core/modules/overlay/css/overlay-child-rtl.css +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @file - * RTL styling for Overlay child pages. - */ - -html { - direction: rtl; -} - -#overlay-title { - float: right; - left: auto; -} -#overlay-close-wrapper { - left: 0; - right: auto; -} -#overlay-close, -#overlay-close:hover { - border-radius: 12px 0 0 12px; -} - -/** - * Tabs on the overlay. - */ -#overlay-tabs { - left: 20px; - right: auto; -} diff --git a/core/modules/overlay/css/overlay-child.css b/core/modules/overlay/css/overlay-child.css index 4610749..6fe068d 100644 --- a/core/modules/overlay/css/overlay-child.css +++ b/core/modules/overlay/css/overlay-child.css @@ -3,6 +3,10 @@ * Basic styling for the Overlay child pages. */ +html[dir=rtl] { + direction: rtl; +} + .js { background: transparent !important; overflow-y: scroll; @@ -49,6 +53,10 @@ margin: 0; padding: 0.3em 0; } +[dir=rtl] #overlay-title { + float: right; + left: auto; +} #overlay-title:active, #overlay-title:focus { outline: 0; @@ -61,6 +69,10 @@ position: absolute; right: 0; /* LTR */ } +[dir=rtl] #overlay-close-wrapper { + left: 0; + right: auto; +} #overlay-close, #overlay-close:hover { background: #ffffff url(../images/close.png) no-repeat; @@ -73,6 +85,10 @@ position: absolute; width: 26px; } +[dir=rtl] #overlay-close, +[dir=rtl] #overlay-close:hover { + border-radius: 12px 0 0 12px; +} /** * Tabs on the overlay. @@ -84,6 +100,10 @@ right: 20px; /* LTR */ text-transform: uppercase; } +[dir=rtl] #overlay-tabs { + left: 20px; + right: auto; +} #overlay-tabs li { display: inline-block; list-style: none; diff --git a/core/modules/shortcut/css/shortcut.module-rtl.css b/core/modules/shortcut/css/shortcut.module-rtl.css deleted file mode 100644 index ed903a7..0000000 --- a/core/modules/shortcut/css/shortcut.module-rtl.css +++ /dev/null @@ -1,13 +0,0 @@ - -/** - * @file - * Generic RTL base styles for shortcut module. - */ - -/** - * Add/remove links. - */ -.add-or-remove-shortcuts .icon, -.add-or-remove-shortcuts .text { - float: right; -} diff --git a/core/modules/shortcut/css/shortcut.module.css b/core/modules/shortcut/css/shortcut.module.css index 8575904..4d1f641 100644 --- a/core/modules/shortcut/css/shortcut.module.css +++ b/core/modules/shortcut/css/shortcut.module.css @@ -16,6 +16,10 @@ float: left; /* LTR */ padding-top: 2px; } +[dir=rtl] .add-or-remove-shortcuts .icon, +[dir=rtl] .add-or-remove-shortcuts .text { + float: right; +} .add-or-remove-shortcuts a:focus .text, .add-or-remove-shortcuts a:hover .text { display: block; diff --git a/core/modules/shortcut/css/shortcut.theme-rtl.css b/core/modules/shortcut/css/shortcut.theme-rtl.css deleted file mode 100644 index 8a687d9..0000000 --- a/core/modules/shortcut/css/shortcut.theme-rtl.css +++ /dev/null @@ -1,41 +0,0 @@ - -/** - * @file - * RTL styling for the shortcut module. - */ - -/** - * Add/remove links. - */ -.add-or-remove-shortcuts .icon { - margin-left: 0; - margin-right: 8px; -} -.add-shortcut a:focus .icon, -.add-shortcut a:hover .icon { - background-position: 0 -24px; -} -.remove-shortcut a:focus .icon, -.remove-shortcut a:hover .icon { - background-position: -12px -24px; -} -.add-or-remove-shortcuts .text { - padding: 0 10px 0 6px; -} -.add-or-remove-shortcuts a:focus .text, -.add-or-remove-shortcuts a:hover .text { - border-radius: 5px 0 0 5px; -} - -/** - * Toolbar. - */ -.toolbar-js .horizontal #edit-shortcuts { - border-left: 0 none; - border-right: 1px solid #d9d9d9; - float: right; - margin-left: 0; - margin-right: 0.3333em; - padding-left: 0.3333em; - padding-right: 0.6667em; -} diff --git a/core/modules/shortcut/css/shortcut.theme.css b/core/modules/shortcut/css/shortcut.theme.css index a9525a7..df5a6e8 100644 --- a/core/modules/shortcut/css/shortcut.theme.css +++ b/core/modules/shortcut/css/shortcut.theme.css @@ -26,6 +26,15 @@ .toolbar .horizontal .edit-shortcuts { float: left; /* LTR */ } +[dir=rtl] .toolbar .horizontal .edit-shortcuts { + border-left: 0 none; + border-right: 1px solid #d9d9d9; + float: right; + margin-left: 0; + margin-right: 0.3333em; + padding-left: 0.3333em; + padding-right: 0.6667em; +} /** * Add/remove links. @@ -38,10 +47,25 @@ text-indent: 12px; width: 12px; } +[dir=rtl] .add-or-remove-shortcuts .icon { + margin-left: 0; + margin-right: 8px; +} +[dir=rtl] .add-or-remove-shortcuts .text { + padding: 0 10px 0 6px; +} +[dir=rtl] .add-or-remove-shortcuts a:focus .text, +[dir=rtl] .add-or-remove-shortcuts a:hover .text { + border-radius: 5px 0 0 5px; +} .add-shortcut a:focus .icon, .add-shortcut a:hover .icon { background-position: 0 -12px; /* LTR */ } +[dir=rtl] .add-shortcut a:focus .icon, +[dir=rtl] .add-shortcut a:hover .icon { + background-position: 0 -24px; +} .remove-shortcut .icon { margin-top: 4px; background-position: -12px 0; @@ -50,3 +74,7 @@ .remove-shortcut a:hover .icon { background-position: -12px -12px; /* LTR */ } +[dir=rtl] .remove-shortcut a:focus .icon, +[dir=rtl] .remove-shortcut a:hover .icon { + background-position: -12px -24px; +} diff --git a/core/modules/system/css/system.admin-rtl.css b/core/modules/system/css/system.admin-rtl.css deleted file mode 100644 index 04ec9fc..0000000 --- a/core/modules/system/css/system.admin-rtl.css +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @file - * RTL styles for administration pages. - */ - -/** - * Administration blocks. - */ -div.admin-panel .body { - padding: 0 8px 2px 4px; -} -@media screen and (min-width: 40em) { - div.admin .left { - float: right; - margin-left: 0; - margin-right: 1em; - } - div.admin .right { - float: left; - margin-left: 1em; - margin-right: 0; - } -} -div.admin .expert-link { - margin-right: 0; - margin-left: 1em; - padding-right: 0; - padding-left: 4px; - text-align: left; -} - -/** - * Status report. - */ -table.system-status-report td.status-icon { - padding-left: 0; - padding-right: 6px; -} - -/** - * Appearance page. - */ -/** -* Theme display without vertical toolbar. -*/ -@media screen and (min-width: 45em) { - body:not(.toolbar-vertical) .system-themes-list-enabled .screenshot, - body:not(.toolbar-vertical) .system-themes-list-enabled .no-screenshot { - float: right; - margin: 0 0 0 20px; - } - body:not(.toolbar-vertical) .system-themes-list-disabled .theme-selector { - float: right; - padding: 20px 0 20px 20px; - } -} - -/** -* Theme display with vertical toolbar. -*/ -@media screen and (min-width: 60em) { - .toolbar-vertical .system-themes-list-enabled .screenshot, - .toolbar-vertical .system-themes-list-enabled .no-screenshot { - float: right; - margin: 0 0 0 20px; - } - .toolbar-vertical .system-themes-list-disabled .theme-selector { - float: right; - padding: 20px 0 20px 20px; - } -} -.theme-selector .operations li { - float: right; - border-left: 1px solid #cdcdcd; - border-right: none; -} -.theme-selector .operations li.last { - padding: 0 0.7em 0 0; - border-left: none; -} -.theme-selector .operations li.first { - padding: 0 0 0 0.7em; -} - -/** - * Exposed filters. - */ -.exposed-filters .filters { - float: right; - margin-left: 1em; - margin-right: 0; -} -.exposed-filters .form-item label { - float: right; -} -/* Current filters */ -.exposed-filters .additional-filters { - float: right; - margin-left: 1em; - margin-right: 0; -} diff --git a/core/modules/system/css/system.admin.css b/core/modules/system/css/system.admin.css index b0c893c..c600539 100644 --- a/core/modules/system/css/system.admin.css +++ b/core/modules/system/css/system.admin.css @@ -17,6 +17,9 @@ div.admin-panel .description { div.admin-panel .body { padding: 0 4px 2px 8px; /* LTR */ } +[dir=rtl] div.admin-panel .body { + padding: 0 8px 2px 4px; +} div.admin { padding-top: 15px; } @@ -26,17 +29,34 @@ div.admin { width: 47%; margin-left: 1em; /* LTR */ } + [dir=rtl] div.admin .left { + float: right; + margin-left: 0; + margin-right: 1em; + } div.admin .right { float: right; /* LTR */ width: 47%; margin-right: 1em; /* LTR */ } + [dir=rtl] div.admin .right { + float: left; + margin-left: 1em; + margin-right: 0; + } } div.admin .expert-link { text-align: right; /* LTR */ margin-right: 1em; /* LTR */ padding-right: 4px; /* LTR */ } +[dir=rtl] div.admin .expert-link { + margin-right: 0; + margin-left: 1em; + padding-right: 0; + padding-left: 4px; + text-align: left; +} /** * Markup generated by theme_system_compact_link(). @@ -177,6 +197,10 @@ table.system-status-report td.status-icon { width: 16px; padding-right: 0; /* LTR */ } +[dir=rtl] table.system-status-report td.status-icon { + padding-left: 0; + padding-right: 6px; +} table.system-status-report td.status-icon div { background-repeat: no-repeat; height: 16px; @@ -266,6 +290,11 @@ table.system-status-report .status-title { margin: 0 20px 0 0; /* LTR */ width: 294px; } + [dir=rtl] body:not(.toolbar-vertical) .system-themes-list-enabled .screenshot, + [dir=rtl] body:not(.toolbar-vertical) .system-themes-list-enabled .no-screenshot { + float: right; + margin: 0 0 0 20px; + } body:not(.toolbar-vertical) .system-themes-list-enabled h3 { margin-top: 0; } @@ -277,6 +306,10 @@ table.system-status-report .status-title { float: left; /* LTR */ padding: 20px 20px 20px 0; /* LTR */ } + [dir=rtl] body:not(.toolbar-vertical) .system-themes-list-disabled .theme-selector { + float: right; + padding: 20px 0 20px 20px; + } body:not(.toolbar-vertical) .system-themes-list-disabled .theme-info { min-height: 170px; } @@ -303,6 +336,11 @@ table.system-status-report .status-title { margin: 0 20px 0 0; /* LTR */ width: 294px; } + [dir=rtl] .toolbar-vertical .system-themes-list-enabled .screenshot, + [dir=rtl] .toolbar-vertical .system-themes-list-enabled .no-screenshot { + float: right; + margin: 0 0 0 20px; + } .toolbar-vertical .system-themes-list-enabled h3 { margin-top: 0; } @@ -314,6 +352,10 @@ table.system-status-report .status-title { float: left; /* LTR */ padding: 20px 20px 20px 0; /* LTR */ } + [dir=rtl] .toolbar-vertical .system-themes-list-disabled .theme-selector { + float: right; + padding: 20px 0 20px 20px; + } .toolbar-vertical .system-themes-list-disabled .theme-info { min-height: 170px; } @@ -348,13 +390,25 @@ table.system-status-report .status-title { list-style-type: none; border-right: 1px solid #cdcdcd; /* LTR */ } +[dir=rtl] .theme-selector .operations li { + float: right; + border-left: 1px solid #cdcdcd; + border-right: none; +} .theme-selector .operations li.last { padding: 0 0 0 0.7em; /* LTR */ border-right: none; /* LTR */ } +[dir=rtl] .theme-selector .operations li.last { + padding: 0 0.7em 0 0; + border-left: none; +} .theme-selector .operations li.first { padding: 0 0.7em 0 0; /* LTR */ } +[dir=rtl] .theme-selector .operations li.first { + padding: 0 0 0 0.7em; +} #system-themes-admin-form { clear: left; } @@ -366,6 +420,11 @@ table.system-status-report .status-title { float: left; /* LTR */ margin-right: 1em; /* LTR */ } +[dir=rtl] .exposed-filters .filters { + float: right; + margin-left: 1em; + margin-right: 0; +} .exposed-filters .form-item { margin: 0 0 0.1em 0; padding: 0; @@ -375,6 +434,9 @@ table.system-status-report .status-title { font-weight: normal; width: 10em; } +[dir=rtl] .exposed-filters .form-item label { + float: right; +} .exposed-filters .form-select { width: 14em; } @@ -390,3 +452,8 @@ table.system-status-report .status-title { float: left; /* LTR */ margin-right: 1em; /* LTR */ } +[dir=rtl] .exposed-filters .additional-filters { + float: right; + margin-left: 1em; + margin-right: 0; +} diff --git a/core/modules/system/css/system.module-rtl.css b/core/modules/system/css/system.module-rtl.css deleted file mode 100644 index d01792e..0000000 --- a/core/modules/system/css/system.module-rtl.css +++ /dev/null @@ -1,55 +0,0 @@ - -/** - * @file - * Generic theme-independent base styles. - */ - -/** - * Autocomplete. - */ -/* Animated throbber */ -.js input.form-autocomplete { - background-position: 0% 2px; -} -.js input.throbbing { - background-position: 0% -18px; -} - -/** - * Progress bar. - */ -.progress .percentage { - float: left; -} -.progress-disabled { - float: right; -} -.ajax-progress { - float: right; -} - -/** - * TableDrag behavior. - */ -.draggable a.tabledrag-handle { - float: right; - margin-right: -1em; - margin-left: 0; -} -a.tabledrag-handle .handle { - margin: -0.4em 0.5em; - padding: 0.42em 0.5em; -} -div.indentation { - float: right; - margin: -0.4em -0.4em -0.4em 0.2em; - padding: 0.42em 0.6em 0.42em 0; -} -div.tree-child, -div.tree-child-last { - background-position: -65px center; -} -.tabledrag-toggle-weight-wrapper { - text-align: left; -} - diff --git a/core/modules/system/css/system.module.css b/core/modules/system/css/system.module.css index 2e92836..cf08f02 100644 --- a/core/modules/system/css/system.module.css +++ b/core/modules/system/css/system.module.css @@ -34,9 +34,15 @@ background-position: 100% 2px; /* LTR */ background-repeat: no-repeat; } +.js[dir=rtl] input.form-autocomplete { + background-position: 0% 2px; +} .js input.throbbing { background-position: 100% -18px; /* LTR */ } +.js[dir=rtl] input.throbbing { + background-position: 0% -18px; +} /** * Collapsible details. @@ -91,6 +97,11 @@ body.drag { overflow: hidden; text-decoration: none; } +[dir=rtl] .draggable a.tabledrag-handle { + float: right; + margin-right: -1em; + margin-left: 0; +} a.tabledrag-handle:hover { text-decoration: none; } @@ -101,6 +112,10 @@ a.tabledrag-handle .handle { padding: 0.42em 0.5em; /* LTR */ width: 13px; } +[dir=rtl] a.tabledrag-handle .handle { + margin: -0.4em 0.5em; + padding: 0.42em 0.5em; +} .touch .draggable td { padding: 0 10px; } @@ -130,18 +145,30 @@ div.indentation { padding: 0.42em 0 0.42em 0.6em; /* LTR */ width: 20px; } +[dir=rtl] div.indentation { + float: right; + margin: -0.4em -0.4em -0.4em 0.2em; + padding: 0.42em 0.6em 0.42em 0; +} div.tree-child { background: url(../../../misc/tree.png) no-repeat 11px center; /* LTR */ } div.tree-child-last { background: url(../../../misc/tree-bottom.png) no-repeat 11px center; /* LTR */ } +[dir=rtl] div.tree-child, +[dir=rtl] div.tree-child-last { + background-position: -65px center; +} div.tree-child-horizontal { background: url(../../../misc/tree.png) no-repeat -11px center; } .tabledrag-toggle-weight-wrapper { text-align: right; /* LTR */ } +[dir=rtl] .tabledrag-toggle-weight-wrapper { + text-align: left; +} /** * TableHeader behavior. @@ -172,11 +199,20 @@ table.sticky-header { .progress .percentage { float: right; /* LTR */ } +[dir=rtl] .progress .percentage { + float: left; +} +[dir=rtl] .progress-disabled { + float: right; +} /* Throbber */ .ajax-progress { display: inline-block; padding: 1px 5px 2px 5px; } +[dir=rtl] .ajax-progress { + float: right; +} .ajax-progress-throbber .throbber { background: transparent url(../../../misc/throbber.gif) no-repeat 0px -18px; display: inline; diff --git a/core/modules/system/css/system.theme-rtl.css b/core/modules/system/css/system.theme-rtl.css deleted file mode 100644 index 789d908..0000000 --- a/core/modules/system/css/system.theme-rtl.css +++ /dev/null @@ -1,115 +0,0 @@ - -/** - * @file - * RTL styles for common markup. - */ - -/** - * HTML elements. - */ -th { - text-align: right; - padding-left: 1em; - padding-right: 0; -} -caption { - text-align: right; -} - -/** - * Markup generated by theme_item_list(). - */ -.item-list ul li { - margin: 0 1.5em 0.25em 0; -} - -/** - * Markup generated by theme_more_link(). - */ -.more-link { - text-align: left; -} - -/** - * Markup generated by theme_more_help_link(). - */ -.more-help-link { - text-align: left; -} -.more-help-link a { - background-position: 100% 50%; - padding: 1px 20px 1px 0; -} - -/** - * Collapsible details. - */ -.collapse-processed > summary:before { - background-position: 100% 100%; - float: right; -} -.collapse-processed:not([open]) > summary:before { - background-position: 75% 35%; - -moz-transform: rotate(90deg); - -ms-transform: rotate(90deg); - -o-transform: rotate(90deg); - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -/** - * RTL styles for menus and navigation markup. - */ - -ul.menu { - margin-left: 0; - margin-right: 1em; - text-align: right; -} -.menu .collapsed { - list-style-image: url(../../../misc/menu-collapsed-rtl.png); -} - -/** - * Markup generated by theme_menu_local_tasks(). - */ -.tabs > li { - margin-left: 0.3em; - margin-right: 0; -} - -/** - * RTL Styles for link buttons and action links. - */ -.action-links li:first-child { - margin-left: 0.3em; - margin-right: 0; -} -.button-action:before { - margin-left: 0; - margin-right: -0.1em; - padding-left: 0.2em; - padding-right: 0; -} - -/** - * RTL Styles for system messages. - */ -.messages { - border-width: 1px 8px 1px 1px; - background-position-x: 99%; - padding-left: 20px; - padding-right: 35px; - text-align: right; -} -.messages--status { - background-position: 99.3% 19px; - border-color: #c9e1bd #77b259 #c9e1bd #c9e1bd; -} -.messages--warning { - border-color: #f4daa6 #e09600 #f4daa6 #f4daa6; -} -.messages--error { - border-color: #f9c9bf #e62600 #f9c9bf #f9c9bf; -} - diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css index 19bb45f..af122e5 100644 --- a/core/modules/system/css/system.theme.css +++ b/core/modules/system/css/system.theme.css @@ -33,6 +33,11 @@ th { padding-right: 1em; /* LTR */ text-align: left; /* LTR */ } +[dir=rtl] th { + text-align: right; + padding-left: 1em; + padding-right: 0; +} thead > tr { border-bottom: 1px solid #000; } @@ -43,6 +48,9 @@ tr { caption { text-align: left; /* LTR */ } +[dir=rtl] caption { + text-align: right; +} /** * Publishing status. @@ -78,6 +86,9 @@ td.active { margin: 0 0 0.25em 1.5em; /* LTR */ padding: 0; } +[dir=rtl] .item-list ul li { + margin: 0 1.5em 0.25em 0; +} /** * Markup generated by Form API. @@ -164,6 +175,9 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed { .more-link { text-align: right; /* LTR */ } +[dir=rtl] .more-link { + text-align: left; +} /** * Markup generated by theme_more_help_link(). @@ -171,10 +185,17 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed { .more-help-link { text-align: right; /* LTR */ } +[dir=rtl] .more-help-link { + text-align: left; +} .more-help-link a { background: url(../../../misc/help.png) 0 50% no-repeat; /* LTR */ padding: 1px 0 1px 20px; /* LTR */ } +[dir=rtl] .more-help-link a { + background-position: 100% 50%; + padding: 1px 20px 1px 0; +} /** * Markup generated by theme_pager(). @@ -251,6 +272,10 @@ summary { height: 1em; width: 1em; } +[dir=rtl] .collapse-processed > summary:before { + background-position: 100% 100%; + float: right; +} .collapse-processed:not([open]) > summary:before { background-position: 25% 35%; /* LTR */ -moz-transform: rotate(-90deg); @@ -259,6 +284,14 @@ summary { -webkit-transform: rotate(-90deg); transform: rotate(-90deg); } +[dir=rtl] .collapse-processed:not([open]) > summary:before { + background-position: 75% 35%; + -moz-transform: rotate(90deg); + -ms-transform: rotate(90deg); + -o-transform: rotate(90deg); + -webkit-transform: rotate(90deg); + transform: rotate(90deg); +} /** * TableDrag behavior. @@ -315,6 +348,11 @@ ul.menu { padding: 0; text-align: left; /* LTR */ } +[dir=rtl] ul.menu { + margin-left: 0; + margin-right: 1em; + text-align: right; +} .menu .expanded { list-style-image: url(../../../misc/menu-expanded.png); list-style-type: circle; @@ -323,6 +361,9 @@ ul.menu { list-style-image: url(../../../misc/menu-collapsed.png); /* LTR */ list-style-type: disc; } +[dir=rtl] .menu .collapsed { + list-style-image: url(../../misc/menu-collapsed-rtl.png); +} ul.menu li { padding-top: 0.2em; margin: 0; @@ -384,6 +425,10 @@ ul.tabs { display: inline-block; margin-right: 0.3em; /* LTR */ } +[dir=rtl] .tabs > li { + margin-left: 0.3em; + margin-right: 0; +} .tabs a { display: block; padding: 0.2em 1em; @@ -412,6 +457,10 @@ ul.tabs { .action-links li:first-child { margin-left: 0; /* LTR */ } +[dir=rtl] .action-links li:first-child { + margin-left: 0.3em; + margin-right: 0; +} .button-action { display: inline-block; line-height: 160%; @@ -424,6 +473,12 @@ ul.tabs { margin-left: -0.1em; /* LTR */ padding-right: 0.2em; /* LTR */ } +[dir=rtl] .button-action:before { + margin-left: 0; + margin-right: -0.1em; + padding-left: 0.2em; + padding-right: 0; +} /** * Styles for system messages. @@ -437,6 +492,13 @@ ul.tabs { word-wrap: break-word; overflow-wrap: break-word; } +[dir=rtl] .messages { + border-width: 1px 8px 1px 1px; + background-position-x: 99%; + padding-left: 20px; + padding-right: 35px; + text-align: right; +} .messages + .messages { margin-top: 1.538em; } @@ -455,6 +517,10 @@ ul.tabs { background-image: url(../../../misc/message-16-ok.png); background-position: 12px 19px; /* LTR */ } +[dir=rtl] .messages--status { + background-position: 99.3% 19px; + border-color: #c9e1bd #77b259 #c9e1bd #c9e1bd; +} .messages--status, .ok { color: #325e1c; @@ -468,6 +534,9 @@ table tr.ok { background-image: url(../../../misc/message-16-warning.png); border-color: #f4daa6 #f4daa6 #f4daa6 #e09600; /* LTR */ } +[dir=rtl] .messages--warning { + border-color: #f4daa6 #e09600 #f4daa6 #f4daa6; +} .messages--warning, .warning { color: #734c00; @@ -481,6 +550,9 @@ table tr.warning { background-image: url(../../../misc/message-16-error.png); border-color: #f9c9bf #f9c9bf #f9c9bf #e62600; /* LTR */ } +[dir=rtl] .messages--error { + border-color: #f9c9bf #e62600 #f9c9bf #f9c9bf; +} .messages--error, .error { color: #a51b00; diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php index 57d9353..b162c3b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/CascadingStylesheetsTest.php @@ -204,24 +204,6 @@ function testRenderOverride() { } /** - * Tests Locale module's CSS Alter to include RTL overrides. - */ - function testAlter() { - // Switch the language to a right to left language and add system.module.css. - $language_interface = language(Language::TYPE_INTERFACE); - $language_interface->direction = Language::DIRECTION_RTL; - $path = drupal_get_path('module', 'system'); - drupal_add_css($path . '/css/system.module.css'); - - // Check to see if system.module-rtl.css was also added. - $styles = drupal_get_css(); - $this->assert(strpos($styles, $path . '/css/system.module-rtl.css') !== FALSE, 'CSS is alterable as right to left overrides are added.'); - - // Change the language back to left to right. - $language_interface->direction = Language::DIRECTION_LTR; - } - - /** * Tests that CSS query string remains intact when added to file. */ function testAddCssFileWithQueryString() { diff --git a/core/modules/toolbar/css/toolbar.icons-rtl.css b/core/modules/toolbar/css/toolbar.icons-rtl.css deleted file mode 100644 index aadd333..0000000 --- a/core/modules/toolbar/css/toolbar.icons-rtl.css +++ /dev/null @@ -1,43 +0,0 @@ -/** - * @file toolbar.icons-rtl.css - */ -.toolbar .icon { - padding-left: 1.3333em; - padding-right: 2.75em; -} -.toolbar .icon:before { - left: auto; - right: 0.6667em; -} -.toolbar .menu ul .icon { - padding-left: 0; - padding-right: 1.3333em; -} -.toolbar .vertical .menu ul { - margin-left: 0; - margin-right: 1.5em; -} -.toolbar .vertical .menu ul ul { - margin-left: 0; - margin-right: 0.75em; -} - -@media only screen and (min-width: 16.5em) { - .toolbar .bar .icon:before { - background-size: auto auto; - left: auto; - right: 0; - } -} - -@media only screen and (min-width: 36em) { - .toolbar .bar .icon { - background-position: right center; - padding-left: 1.3333em; - padding-right: 2.75em; - } - .toolbar .bar .icon:before { - left: 0; - right: 0.6667em; - } -} diff --git a/core/modules/toolbar/css/toolbar.icons.css b/core/modules/toolbar/css/toolbar.icons.css index 7fc06bf..dc457ca 100644 --- a/core/modules/toolbar/css/toolbar.icons.css +++ b/core/modules/toolbar/css/toolbar.icons.css @@ -5,6 +5,10 @@ padding-left: 2.75em; /* LTR */ position: relative; } +[dir=rtl] .toolbar .icon { + padding-left: 1.3333em; + padding-right: 2.75em; +} .toolbar .icon:before { background-attachment: scroll; background-color: transparent; @@ -18,6 +22,10 @@ top: 0; width: 20px; } +[dir=rtl] .toolbar .icon:before { + left: auto; + right: 0.6667em; +} .toolbar button.icon { background-color: transparent; border: 0; @@ -26,15 +34,27 @@ .toolbar .menu ul .icon { padding-left: 1.3333em; /* LTR */ } +[dir=rtl] .toolbar .menu ul .icon { + padding-left: 0; + padding-right: 1.3333em; +} .toolbar .menu ul a.icon:before { display: none; } .toolbar .vertical .menu ul { margin-left: 1.5em; /* LTR */ } +[dir=rtl] .toolbar .vertical .menu ul { + margin-left: 0; + margin-right: 1.5em; +} .toolbar .vertical .menu ul ul { margin-left: 0.75em; /* LTR */ } +[dir=rtl] .toolbar .vertical .menu ul ul { + margin-left: 0; + margin-right: 0.75em; +} /** * Top level icons @@ -127,6 +147,11 @@ left: 0; /* LTR */ width: 100%; } + [dir=rtl] .toolbar .bar .icon:before { + background-size: auto auto; + left: auto; + right: 0; + } } @media only screen and (min-width: 36em) { @@ -137,8 +162,17 @@ text-indent: 0; width: auto; } + [dir=rtl] .toolbar .bar .icon { + background-position: right center; + padding-left: 1.3333em; + padding-right: 2.75em; + } .toolbar .bar .icon:before { left: 0.6667em; /* LTR */ width: 20px; } + [dir=rtl] .toolbar .bar .icon:before { + left: 0; + right: 0.6667em; + } } diff --git a/core/modules/toolbar/css/toolbar.menu-rtl.css b/core/modules/toolbar/css/toolbar.menu-rtl.css deleted file mode 100644 index 1435225..0000000 --- a/core/modules/toolbar/css/toolbar.menu-rtl.css +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @file toolbar.menu-rtl.css - */ -.toolbar .vertical .handle + a { - margin-left: 3em; - margin-right: 0; -} - -/** - * Handle. - */ -.toolbar .icon.handle { - left: 0; - right: auto; -} -.toolbar .icon.handle:before { - left: auto; - right: 0; -} diff --git a/core/modules/toolbar/css/toolbar.menu.css b/core/modules/toolbar/css/toolbar.menu.css index c77c4c5..39f214d 100644 --- a/core/modules/toolbar/css/toolbar.menu.css +++ b/core/modules/toolbar/css/toolbar.menu.css @@ -23,6 +23,10 @@ .toolbar .vertical .handle + a { margin-right: 3em; /* LTR */ } +[dir=rtl] .toolbar .vertical .handle + a { + margin-left: 3em; + margin-right: 0; +} .toolbar .tray .active-trail > .box a, .toolbar .tray a.active { color: #000; @@ -86,10 +90,18 @@ width: 3em; z-index: 1; } +[dir=rtl] .toolbar .icon.handle { + left: 0; + right: auto; +} .toolbar .icon.handle:before { background-image: url("../images/icon-open.png"); left: 0; /* LTR */ } +[dir=rtl] .toolbar .icon.handle:before { + left: auto; + right: 0; +} .toolbar .icon.handle.open:before { background-image: url("../images/icon-collapse.png"); } diff --git a/core/modules/toolbar/css/toolbar.module-rtl.css b/core/modules/toolbar/css/toolbar.module-rtl.css deleted file mode 100644 index ae80d8a..0000000 --- a/core/modules/toolbar/css/toolbar.module-rtl.css +++ /dev/null @@ -1,78 +0,0 @@ -/** - * @file toolbar.module-rtl.css - */ -html.js .toolbar { - left: auto; - right: 0; -} -.js .toolbar .bar .tab { - float: right; -} - -/** - * Administration menu. - */ -.js .toolbar .bar { - left: auto; - right: 0; -} -@media only screen { - .js .toolbar .bar .tab, - .js .toolbar .tray li { - float: none; - } -} -@media only screen and (min-width: 16.5em) { - .js .toolbar .bar .tab, - .js .toolbar .horizontal li { - float: right; - } -} - -/** - * Toolbar tray. - */ -.toolbar .vertical { - left: auto; - right: -100%; -} -.toolbar .horizontal { - left: auto; - right: 0; -} -.toolbar .vertical > .lining { - left: auto; - right: -100%; -} -.toolbar .vertical.active, -.toolbar .vertical.active > .lining { - left: auto; - right: 0; -} -@media only screen and (min-width: 16.5em) { - .toolbar .vertical.active > .lining:before { - left: auto; - right: -1px; - } -} - -/** - * At larger screen sizes, the tray pushes the page content. - */ -@media only screen and (min-width: 38.125em) { - body.toolbar-tray-open.toolbar-vertical { - margin-left: 0; - margin-right: 240px; - margin-right: 15rem; - } -} -/** - * ToolBar tray orientation toggle. - */ -.toolbar .horizontal .toggle-orientation { - left: 0; - right: auto; -} -.toolbar .vertical .toggle-orientation { - float: left; -} diff --git a/core/modules/toolbar/css/toolbar.module.css b/core/modules/toolbar/css/toolbar.module.css index 9406f86..be20fdc 100644 --- a/core/modules/toolbar/css/toolbar.module.css +++ b/core/modules/toolbar/css/toolbar.module.css @@ -25,6 +25,11 @@ html.js .toolbar { top: 0; width: 100%; } +html.js[dir=rtl] .toolbar { + left: auto; + right: 0; + } + /** * Very specific overrides for Drupal system CSS. */ @@ -47,6 +52,10 @@ html.js .toolbar { .js .toolbar .horizontal .tab { float: left; /* LTR */ } +.js[dir=rtl] .toolbar .bar .tab, +.js[dir=rtl] .toolbar .horizontal .tab { + float: right; +} .js .toolbar a { display: block; line-height: 1; @@ -61,17 +70,29 @@ html.js .toolbar { z-index: 1250; width: 100%; } +.js[dir=rtl] .toolbar .bar { + left: auto; + right: 0; +} @media only screen { .js .toolbar .bar .tab, .js .toolbar .tray li { float: none; /* LTR */ } + .js[dir=rtl] .toolbar .bar .tab, + .js[dir=rtl] .toolbar .tray li { + float: none; + } } @media only screen and (min-width: 16.5em) { .js .toolbar .bar .tab, .js .toolbar .horizontal li { float: left; /* LTR */ } + .js[dir=rtl] .toolbar .bar .tab, + .js[dir=rtl] .toolbar .horizontal li { + float: right; + } } @media only screen and (min-width: 28.125em) { .js .toolbar .bar { @@ -106,12 +127,20 @@ html.js .toolbar { left: -100%; /* LTR */ position: absolute; } +[dir=rtl] .toolbar .vertical { + left: auto; + right: -100%; +} .toolbar .horizontal { left: 0; /* LTR */ height: 0; /* Set one higher than the contextual links gear. */ z-index: 1000; } +[dir=rtl] .toolbar .horizontal { + left: auto; + right: 0; +} .toolar .tray .lining { position: relative; } @@ -124,6 +153,11 @@ html.js .toolbar { position: absolute; width: 100%; } +[dir=rtl] .toolbar .vertical > .lining, +[dir=rtl] .toolbar .vertical > .lining:before { + left: auto; + right: -100%; +} .toolbar .vertical > .lining:before { bottom: 0; -moz-box-sizing: content-box; @@ -151,6 +185,11 @@ html.js .toolbar { left: 0; /* LTR */ top: 0; } +[dir=rtl] .toolbar .vertical.active, +[dir=rtl] .toolbar .vertical.active > .lining { + left: auto; + right: 0; +} /* Make vertical toolbar tray scroll with page for touch devices. */ .touch .toolbar .vertical.active, .touch .toolbar .vertical.active > .lining { @@ -181,6 +220,10 @@ html.js .toolbar { display: block; left: -1px; /* LTR */ } + [dir=rtl] .toolbar .vertical.active > .lining:before { + left: auto; + right: -1px; + } } @media only screen and (min-width: 28.125em) { .toolbar .tray.horizontal { @@ -195,6 +238,11 @@ html.js .toolbar { margin-left: 240px; /* LTR */ margin-left: 15rem; /* LTR */ } + [dir=rtl] body.toolbar-tray-open.toolbar-vertical { + margin-left: 0; + margin-right: 240px; + margin-right: 15rem; + } } /** * ToolBar tray orientation toggle. @@ -221,7 +269,14 @@ html.js .toolbar { right: 0; /* LTR */ top: 0; } +[dir=rtl] .toolbar .horizontal .toggle-orientation { + left: 0; + right: auto; +} .toolbar .vertical .toggle-orientation { float: right; /* LTR */ width: 100%; } +[dir=rtl] .toolbar .vertical .toggle-orientation { + float: left; +} diff --git a/core/modules/toolbar/css/toolbar.theme-rtl.css b/core/modules/toolbar/css/toolbar.theme-rtl.css deleted file mode 100644 index 031bc60..0000000 --- a/core/modules/toolbar/css/toolbar.theme-rtl.css +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @file toolbar.theme-rtl.css - */ - -/** - * Toolbar bar. - */ -.toolbar .bar { - box-shadow: 1px 0 3px 1px rgba(0, 0, 0, 0.3333); -} -/** - * Toolbar tray. - */ - .toolbar .horizontal { - box-shadow: 2px 1px 3px 1px rgba(0, 0, 0, 0.3333); -} -.toolbar .horizontal > .lining { - padding-right: 0; - padding-left: 5em; -} -.toolbar .vertical > .lining, -.toolbar .vertical > .lining:before { - border-left: 1px solid #aaaaaa; - border-right: 0 none; -} -.toolbar .vertical > .lining:before { - box-shadow: 1px 0 5px 2px rgba(0, 0, 0, 0.3333); -} -.toolbar .horizontal .menu li + li { - border-left: 0 none ; - border-right: 1px solid #dddddd; -} -.toolbar .horizontal .menu li:last-child { - border-left: 1px solid #dddddd; -} -.toolbar .vertical .menu .menu .menu { - margin-left: 0; - margin-right: 1.3333em; -} -.toolbar .vertical .menu .menu .menu .menu { - margin-left: 0; - margin-right: 0.25em; -} -.toolbar .vertical .menu .menu .menu a { - padding-left: 0; - padding-right: 0.5em; -} - -/** - * Orientation toggle. - */ -.toolbar .horizontal .toggle-orientation { - border-left: 0 none; - border-right: 1px solid #c9c9c9; -} -.toolbar .toggle-orientation > .lining { - float: left; -} -.toolbar .toggle-orientation button:before { - left: auto; - right: 0; -} -.toolbar .toggle-orientation [value="vertical"]:before { - background-image: url('../images/icon-toggle-vertical-rtl.png'); /* LTR */ -} diff --git a/core/modules/toolbar/css/toolbar.theme.css b/core/modules/toolbar/css/toolbar.theme.css index 4b1805f..9a50a3c 100644 --- a/core/modules/toolbar/css/toolbar.theme.css +++ b/core/modules/toolbar/css/toolbar.theme.css @@ -31,6 +31,9 @@ box-shadow: -1px 0 3px 1px rgba(0, 0, 0, 0.3333); /* LTR */ color: #dddddd; } +[dir=rtl] .toolbar .bar { + box-shadow: 1px 0 3px 1px rgba(0, 0, 0, 0.3333); +} .toolbar .bar a { color: #ffffff; } @@ -56,18 +59,33 @@ .toolbar .horizontal > .lining { padding-right: 5em; /* LTR */ } +[dir=rtl] .toolbar .horizontal > .lining { + padding-right: 0; + padding-left: 5em; +} .toolbar .vertical > .lining, .toolbar .vertical > .lining:before { background-color: #ffffff; border-right: 1px solid #aaaaaa; /* LTR */ } +[dir=rtl] .toolbar .vertical > .lining, +[dir=rtl] .toolbar .vertical > .lining:before { + border-left: 1px solid #aaaaaa; + border-right: 0 none; +} .toolbar .vertical > .lining:before { box-shadow: -1px 0 5px 2px rgba(0, 0, 0, 0.3333); /* LTR */ } +[dir=rtl] .toolbar .vertical > .lining:before { + box-shadow: 1px 0 5px 2px rgba(0, 0, 0, 0.3333); +} .toolbar .horizontal { border-bottom: 1px solid #aaaaaa; box-shadow: -2px 1px 3px 1px rgba(0, 0, 0, 0.3333); /* LTR */ } +[dir=rtl] .toolbar .horizontal { + box-shadow: 2px 1px 3px 1px rgba(0, 0, 0, 0.3333); +} .toolbar .horizontal .tray { background-color: #f5f5f5; } @@ -85,9 +103,16 @@ .toolbar .horizontal .menu li + li { border-left: 1px solid #dddddd; /* LTR */ } +[dir=rtl] .toolbar .horizontal .menu li + li { + border-left: 0 none ; + border-right: 1px solid #dddddd; +} .toolbar .horizontal .menu li:last-child { border-right: 1px solid #dddddd; /* LTR */ } +[dir=rtl] .toolbar .horizontal .menu li:last-child { + border-left: 1px solid #dddddd; +} .toolbar .vertical .menu li + li { border-top: 1px solid #dddddd; } @@ -107,15 +132,27 @@ .toolbar .vertical .menu .menu .menu { margin-left: 1.3333em; /* LTR */ } +[dir=rtl] .toolbar .vertical .menu .menu .menu { + margin-left: 0; + margin-right: 1.3333em; +} .toolbar .vertical .menu .menu .menu .menu { margin-left: 0.25em; /* LTR */ } +[dir=rtl] .toolbar .vertical .menu .menu .menu .menu { + margin-left: 0; + margin-right: 0.25em; +} .toolbar .menu .menu a { color: #434343; } .toolbar .vertical .menu .menu .menu a { padding-left: 0.6667em; /* LTR */ } +[dir=rtl] .toolbar .vertical .menu .menu .menu a { + padding-left: 0; + padding-right: 0.5em; +} /** * Orientation toggle. @@ -127,10 +164,17 @@ .toolbar .horizontal .toggle-orientation { border-left: 1px solid #c9c9c9; /* LTR */ } +[dir=rtl] .toolbar .horizontal .toggle-orientation { + border-left: 0 none; + border-right: 1px solid #c9c9c9; +} .toolbar .toggle-orientation > .lining { float: right; /* LTR */ padding: 0.1667em; } +[dir=rtl] .toolbar .toggle-orientation > .lining { + float: left; +} .toolbar .toggle-orientation button { cursor: pointer; display: inline-block; @@ -142,9 +186,16 @@ .toolbar .toggle-orientation button:before { left: 0; /* LTR */ } +[dir=rtl] .toolbar .toggle-orientation button:before { + left: auto; + right: 0; +} .toolbar .toggle-orientation [value="vertical"]:before { background-image: url('../images/icon-toggle-vertical.png'); /* LTR */ } +[dir=rtl] .toolbar .toggle-orientation [value="vertical"]:before { + background-image: url('../images/icon-toggle-vertical-rtl.png'); /* LTR */ +} .toolbar .toggle-orientation [value="horizontal"]:before { background-image: url('../images/icon-toggle-horizontal.png'); } diff --git a/core/modules/tour/css/tour.module-rtl.css b/core/modules/tour/css/tour.module-rtl.css deleted file mode 100644 index 5e19f7b..0000000 --- a/core/modules/tour/css/tour.module-rtl.css +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @file - * RTL styling for tour module. - */ - -.js .toolbar .bar .tour-toolbar-tab.tab { - float: left; -} - -.tour-progress { - right: 0; - left: 15px; -} diff --git a/core/modules/tour/css/tour.module.css b/core/modules/tour/css/tour.module.css index 07033cd..529a661 100644 --- a/core/modules/tour/css/tour.module.css +++ b/core/modules/tour/css/tour.module.css @@ -7,6 +7,9 @@ .js .toolbar .bar .tour-toolbar-tab.tab { float: right; /* LTR */ } +.js[dir=rtl] .toolbar .tour-toolbar-tab.tab { + float: left; +} .js .toolbar .tour-toolbar-tab button { padding-bottom: 1em; padding-top: 1em; @@ -32,6 +35,10 @@ bottom: 10px; right: 15px; /* LTR */ } +[dir=rtl] .tour-progress { + right: 0; + left: 15px; +} /* @todo Remove once http://drupal.org/node/1916690 is resolved. */ .js .toolbar .tour-toolbar-tab.tab.hidden { diff --git a/core/modules/update/css/update.admin-rtl.css b/core/modules/update/css/update.admin-rtl.css deleted file mode 100644 index f181c84..0000000 --- a/core/modules/update/css/update.admin-rtl.css +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @file - * RTL styles used by the Update Manager module. - */ - -.update .project { - padding-right: .25em; -} - -.update .version-status { - float: left; - padding-left: 10px; -} - -.update .version-status .icon { - padding-right: .5em; -} - -.update table.version .version-title { - padding-left: 1em; -} - -.update table.version .version-details { - padding-left: .5em; - direction: ltr; -} - -.update table.version .version-links { - text-align: left; - padding-left: 1em; -} - -.update .check-manually { - padding-right: 1em; -} diff --git a/core/modules/update/css/update.admin.css b/core/modules/update/css/update.admin.css index cb20500..231f86d 100644 --- a/core/modules/update/css/update.admin.css +++ b/core/modules/update/css/update.admin.css @@ -9,6 +9,9 @@ padding-left: .25em; /* LTR */ height: 22px; } +[dir=rtl] .update .project { + padding-right: .25em; +} .update .version-status { float: right; /* LTR */ @@ -16,10 +19,17 @@ font-size: 110%; height: 20px; } +[dir=rtl] .update .version-status { + float: left; + padding-left: 10px; +} .update .version-status .icon { padding-left: .5em; /* LTR */ } +[dir=rtl] .update .version-status .icon { + padding-right: .5em; +} .update .version-date { white-space: nowrap; @@ -93,15 +103,26 @@ table.update, padding-left: 1em; /* LTR */ width: 14em; } +[dir=rtl] .update table.version .version-title { + padding-left: 1em; +} .update table.version .version-details { padding-right: .5em; /* LTR */ } +[dir=rtl] .update table.version .version-details { + padding-left: .5em; + direction: ltr; +} .update table.version .version-links { text-align: right; /* LTR */ padding-right: 1em; /* LTR */ } +[dir=rtl] .update table.version .version-links { + text-align: left; + padding-left: 1em; +} .update table.version-security .version-title { color: #970f00; @@ -119,6 +140,9 @@ table.update, .update .check-manually { padding-left: 1em; /* LTR */ } +[dir=rtl] .update .check-manually { + padding-right: 1em; +} .update-major-version-warning { color: #ff0000; diff --git a/core/modules/user/css/user.module-rtl.css b/core/modules/user/css/user.module-rtl.css deleted file mode 100644 index ec459b4..0000000 --- a/core/modules/user/css/user.module-rtl.css +++ /dev/null @@ -1,22 +0,0 @@ - -#permissions td.permission { - padding-left: 0; - padding-right: 1.5em; -} - -/** - * Password strength indicator. - */ -.password-strength { - float: left; -} -.password-strength-text { - float: left; -} -div.password-confirm { - float: left; -} -.confirm-parent, -.password-parent { - clear: right; -} diff --git a/core/modules/user/css/user.module.css b/core/modules/user/css/user.module.css index ce8b166..24cd259 100644 --- a/core/modules/user/css/user.module.css +++ b/core/modules/user/css/user.module.css @@ -4,6 +4,10 @@ #permissions td.permission { padding-left: 1.5em; /* LTR */ } +[dir=rtl] #permissions td.permission { + padding-left: 0; + padding-right: 1.5em; +} #permissions tr.odd .form-item, #permissions tr.even .form-item { white-space: normal; @@ -20,6 +24,9 @@ width: 17em; float: right; /* LTR */ } +[dir=rtl] .password-strength { + float: left; +} .password-strength-title { display: inline; } @@ -27,6 +34,9 @@ float: right; /* LTR */ font-weight: bold; } +[dir=rtl] .password-strength-text { + float: left; +} .password-indicator { background-color: #c4c4c4; height: 0.3em; @@ -47,6 +57,9 @@ div.password-confirm { visibility: hidden; width: 17em; } +[dir=rtl] div.password-confirm { + float: left; +} div.form-item div.password-suggestions { padding: 0.2em 0.5em; margin: 0.7em 0; @@ -62,6 +75,10 @@ div.password-suggestions ul { margin: 0; width: 36.3em; } +[dir=rtl] .confirm-parent, +[dir=rtl] .password-parent { + clear: right; +} /** * Password strength indicator on narrow viewport. diff --git a/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php b/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php index 3fc3b4b..71dd185 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserPermissionsTest.php @@ -62,25 +62,16 @@ function testUserPermissionChanges() { } /** - * Test assigning of permissions for the administrator role. + * Test administrator role access. */ - function testAdministratorRole() { - $this->drupalLogin($this->admin_user); - $this->drupalGet('admin/config/people/accounts'); + function testAdministratorAccess() { + $this->assertFalse(user_access('feed llamas with bananas', $this->admin_user)); - // Set the user's role to be the administrator role. - $edit = array(); - $edit['user_admin_role'] = $this->rid; - $this->drupalPost('admin/config/people/accounts', $edit, t('Save configuration')); + // Turn $this->rid into the administrator role. + config('user.settings')->set('admin_role', $this->rid); - // Enable aggregator module and ensure the 'administer news feeds' - // permission is assigned by default. - $edit = array(); - $edit['modules[Core][aggregator][enable]'] = TRUE; - // Aggregator depends on file module, enable that as well. - $edit['modules[Core][file][enable]'] = TRUE; - $this->drupalPost('admin/modules', $edit, t('Save configuration')); - $this->assertTrue(user_access('administer news feeds', $this->admin_user), 'The permission was automatically assigned to the administrator role'); + // Now the user should have access. + $this->assertTrue(user_access('feed llamas with bananas', $this->admin_user)); } /** diff --git a/core/modules/user/user.module b/core/modules/user/user.module index e0ef6e6..8cd1024 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -480,6 +480,12 @@ function user_access($string, AccountInterface $account = NULL) { return TRUE; } + // Users with the administrator role have all privileges. + $admin_role = config('user.settings')->get('admin_role'); + if ($admin_role && in_array($admin_role, $account->roles)) { + return TRUE; + } + // To reduce the number of SQL queries, we cache the user's permissions // in a static variable. // Use the advanced drupal_static() pattern, since this is called very often. @@ -2407,25 +2413,6 @@ function user_form_field_ui_field_instance_edit_form_submit($form, &$form_state) } /** - * Implements hook_modules_installed(). - */ -function user_modules_installed($modules) { - // Assign all available permissions to the administrator role. - $rid = config('user.settings')->get('admin_role'); - if ($rid) { - $permissions = array(); - foreach ($modules as $module) { - if ($module_permissions = module_invoke($module, 'permission')) { - $permissions = array_merge($permissions, array_keys($module_permissions)); - } - } - if (!empty($permissions)) { - user_role_grant_permissions($rid, $permissions); - } - } -} - -/** * Implements hook_modules_uninstalled(). */ function user_modules_uninstalled($modules) { diff --git a/core/modules/views_ui/css/views_ui.admin-rtl.css b/core/modules/views_ui/css/views_ui.admin-rtl.css deleted file mode 100644 index c79878f..0000000 --- a/core/modules/views_ui/css/views_ui.admin-rtl.css +++ /dev/null @@ -1,85 +0,0 @@ -/** - * The .css file is intended to only contain positioning and size declarations - * For example: display, position, float, clear, and overflow. - */ - -/* @group Inline lists */ - -.horizontal > * { - float: right; -} - -.horizontal.right { - float: left; -} - -/* @end */ - -/* @group Attachment details - * - * The attachment details section, its tabs for each section and the buttons - * to add a new section - */ - -.form-actions { - float: left; -} - -/* @end */ - -/* @group Attachment details tabs - * - * The tabs that switch between sections - */ - -.views-displays .secondary > li { - float: right; -} - -/* @end */ - -/* @group Attachment details new section button */ - -.views-displays .secondary .action-list { - left: auto; - right: 0; -} - -/* @end */ - -/* @group Attachment collapsible details */ - -.views-display-tab summary { - left: auto; -} - -/* @end */ - -/* @group Attachment configuration columns */ - -@media screen and (min-width:45em) { /* 720px */ - .views-display-columns > * { - float: right; - margin-left: 0; - margin-right: 2%; - } - - .views-display-columns > *:first-child { - margin-right: 0; - } -} - -/* @end */ - -/* @group Settings forms */ - -.views-dependent { - margin-right: 1.5em; -} - -.views-display-setting .label, -.views-display-setting .views-ajax-link { - float: right; -} - -/* @end */ diff --git a/core/modules/views_ui/css/views_ui.admin.css b/core/modules/views_ui/css/views_ui.admin.css index c0a37566..6efdfd0 100644 --- a/core/modules/views_ui/css/views_ui.admin.css +++ b/core/modules/views_ui/css/views_ui.admin.css @@ -29,10 +29,16 @@ clear: none; float: left; /* LTR */ } +[dir=rtl] .horizontal > * { + float: right; +} .horizontal.right { float: right; } +[dir=rtl] .horizontal.right { + float: left; +} .horizontal label { position: absolute; @@ -103,6 +109,10 @@ * to add a new section */ +[dir=rtl] .form-actions { + float: left; +} + .form-edit .form-actions { } @@ -129,6 +139,9 @@ float: left; /* LTR */ padding: 0; } +[dir=rtl] .views-displays .secondary > li { + float: right; +} .views-displays .secondary .open > a { position: relative; @@ -174,6 +187,10 @@ top: 23px; z-index: 50; } +[dir=rtl] .views-displays .secondary .action-list { + left: auto; + right: 0; +} .views-displays .secondary .action-list li { display: block; @@ -183,6 +200,10 @@ /* @group Attachment collapsible details */ +[dir=rtl] .views-display-tab summary { + left: auto; +} + .views-display-columns details { border: none; margin: 0; @@ -217,10 +238,18 @@ margin-bottom: 0; width: 32%; } + [dir=rtl] .views-display-columns > * { + float: right; + margin-left: 0; + margin-right: 2%; + } .views-display-columns > *:first-child { margin-left: 0; /* LTR */ } + [dir=rtl] .views-display-columns > *:first-child { + margin-right: 0; + } } /* @end */ @@ -292,11 +321,19 @@ /* @group Settings forms */ +[dir=rtl] .views-dependent { + margin-right: 1.5em; +} + .views-display-setting .label, .views-display-setting .views-ajax-link { display: inline-block; float: left; /* LTR */ } +[dir=rtl] .views-display-setting .label, +[dir=rtl] .views-display-setting .views-ajax-link { + float: right; +} /* @end */ diff --git a/core/modules/views_ui/css/views_ui.admin.theme-rtl.css b/core/modules/views_ui/css/views_ui.admin.theme-rtl.css deleted file mode 100644 index 6548a17..0000000 --- a/core/modules/views_ui/css/views_ui.admin.theme-rtl.css +++ /dev/null @@ -1,220 +0,0 @@ -/** - * The .admin.theme.css file is intended to contain presentation declarations - * including images, borders, colors, and fonts. - */ - -/* @end */ - -/* @group Icons */ - -.actions a, -.views-admin .icon, -.views-admin .icon-text { - background-position: right top; -} - -/* Targets any element with an icon -> text combo */ -.views-admin .icon-text { - padding-right: 19px; -} - -.views-admin .icon-linked { - background-position: right -153px; -} - -.views-admin .icon-unlinked { - background-position: right -195px; -} - -.actions .views-button-add { - background-position: right -39px; -} - -.actions .views-button-rearrange { - background-position: right -96px; -} - -.actions .views-button-add:hover { - background-position: right -58px; -} - -.actions .views-button-rearrange:hover { - background-position: right -115px; -} - -.actions .views-button-add:active { - background-position: right -77px; -} - -.actions .views-button-rearrange:active { - background-position: right -134px; -} - -.views-displays .icon-add { - background-position: right -3px; -} - -.views-displays .secondary a:hover > .icon-add { - background-position: right -21px; -} - -.views-displays .secondary .open a:hover > .icon-add { - background-position: right -3px; -} - -/* @end */ - -/* @group Forms */ - -.form-submit + .form-submit, -.views-admin a.button + a.button { - margin-right: 1em; -} - -.container-inline > * + *, -.container-inline .details-wrapper > * + * { - padding-left: 0; - padding-right: 4px; -} - -.views-admin .form-type-checkbox + .form-wrapper { - margin-right: 16px; -} - -/* @end */ - -/* @group Lists */ - -.horizontal > * + * { - margin-right: 9px; - padding-right: 9px; -} - -/* @end */ - -/* @group Attachments */ - -.views-displays .secondary { - padding: 6px 8px 8px; -} - -.views-displays .views-display-top > ul > li + li { - margin-right: 3px; -} - -.views-displays .views-extra-actions { - left: 10px; -} - -/* @end */ - -/* @group Attachment details tabs - * - * The tabs that switch between sections - */ - -.views-displays .secondary .action-list li:first-child { - -moz-border-radius: 7px 0 0 0; - -webkit-border-top-left-radius: 7px; - -webkit-border-top-right-radius: 0; - border-radius: 7px 0 0 0; -} - -/* @end */ - -/* @group Attachment collapsible details - * - * The attachment section is a collapsible details, but should not - * have a border around it. - */ - -.views-display-tab summary { - left: auto; - right: -5px; -} - -/* @end */ - -/* @group Auto preview - * - * The auto-preview checkbox line. This may have more stuff added to it. - */ - -div.form-item-displays-live-preview { - text-align: left; -} - -/* @end */ - -/* @group Attachment buckets - * - * These are the individual "buckets," or boxes, inside the three columns in the - * attachment details section. - */ - -.views-ui-display-tab-bucket .icon-text { - padding-right: 25px; -} - -/* @end */ - -/* @group Attachment bucket rows - * - * This is each row within one of the "boxes." - */ - -.views-display-setting .label { - margin-left: 3px; -} - -/* @end */ - -/* @group Modal dialog box - * - * The contents of the popup dialog on the views edit form. - */ - -#views-filterable-options-controls .form-item { - margin-left: 2%; -} - -.views-ui-dialog #views-progress-indicator { - left: 10px; - right: auto; -} - -/* @end */ - -/* @group Rearrange filters - * - * Styling for the form that allows views filters to be rearranged. - */ -.views-operator-label { - padding-right: 0.5em; -} - -/* @end */ - -/* @group Live preview elements */ - -/* @group HTML list */ - -#views-live-preview .view-content > .item-list > ul { - padding-right: 21px; -} - -/* @end */ - -/* @group Buttons */ - -.no-js .views-display-top .dropbutton { - left: 12px; - right: auto; -} - -.views-ui-display-tab-bucket .dropbutton { - left: 5px; - right: auto; -} - -/* @end */ diff --git a/core/modules/views_ui/css/views_ui.admin.theme.css b/core/modules/views_ui/css/views_ui.admin.theme.css index bce3fdc..ab5f0f0 100644 --- a/core/modules/views_ui/css/views_ui.admin.theme.css +++ b/core/modules/views_ui/css/views_ui.admin.theme.css @@ -44,6 +44,11 @@ background-repeat: no-repeat; } +[dir=rtl] .views-admin .icon, +[dir=rtl] .views-admin .icon-text { + background-position: right top; +} + .views-admin a.icon { background-image: url("../images/sprites.png"), @@ -105,13 +110,22 @@ .views-admin .icon-text { padding-left: 19px; /* LTR */ } +[dir=rtl] .views-admin .icon-text { + padding-right: 19px; +} .views-admin .icon.linked { - background-position: center -153px; + background-position: center -153px; /* LTR */ +} +[dir=rtl] .views-admin .icon-linked { + background-position: right -153px; } .views-admin .icon.unlinked { - background-position: center -195px; + background-position: center -195px; /* LTR */ +} +[dir=rtl] .views-admin .icon-unlinked { + background-position: right -195px; } .views-admin .icon.add { @@ -141,10 +155,16 @@ .views-displays .secondary a:hover > .icon.add { background-position: center -25px; } +[dir=rtl] .views-displays .secondary a:hover > .icon-add { + background-position: right -21px; +} .views-displays .secondary .open a:hover > .icon.add { background-position: center 3px; } +[dir=rtl] .views-displays .secondary .open a:hover > .icon-add { + background-position: right -3px; +} /* @end */ @@ -177,6 +197,10 @@ input.form-radio { .views-admin a.button:not(.js-hide) + a.button { margin-left: 1em; /* LTR */ } +[dir=rtl] .form-submit:not(.js-hide) + .form-submit, +[dir=rtl] .views-admin a.button:not(.js-hide) + a.button { + margin-right: 1em; +} .container-inline { padding-top: 15px; @@ -186,6 +210,11 @@ input.form-radio { .container-inline .details-wrapper > * + * { padding-left: 4px; /* LTR */ } +[dir=rtl] .container-inline > * + *, +[dir=rtl] .container-inline .details-wrapper > * + * { + padding-left: 0; + padding-right: 4px; +} .views-admin details details.container-inline { margin-bottom: 1em; @@ -201,6 +230,9 @@ input.form-radio { .views-admin .form-type-checkbox + .form-wrapper { margin-left: 16px; /* LTR */ } +[dir=rtl] .views-admin .form-type-checkbox + .form-wrapper { + margin-right: 16px; +} /* Hide 'remove' checkboxes. */ .views-remove-checkbox { @@ -230,6 +262,10 @@ input.form-radio { margin-left: 9px; /* LTR */ padding-left: 9px; /* LTR */ } +[dir=rtl] .horizontal > * + * { + margin-right: 9px; + padding-right: 9px; +} .views-ui-view-title { font-weight: bold; @@ -377,6 +413,10 @@ td.group-title { padding-left: 0.5em; /* LTR */ text-transform: uppercase; } +[dir=rtl] .views-operator-label { + padding-right: 0.5em; + padding-left: 0; +} .grouped-description, .exposed-description { @@ -719,6 +759,10 @@ ul#views-display-menu-tabs li.add ul.action-list li{ .views-display-setting .label { margin-right: 3px; /* LTR */ } +[dir=rtl] .views-display-setting .label { + margin-left: 3px; + margin-right: 0; +} /* @end */ @@ -826,6 +870,10 @@ ul#views-display-menu-tabs li.add ul.action-list li{ width: 45%; margin-right: 2%; /* LTR */ } +[dir=rtl] #views-filterable-options-controls .form-item { + margin-left: 2%; + margin-right: 0; +} #views-filterable-options-controls input, #views-filterable-options-controls select { @@ -873,6 +921,10 @@ ul#views-display-menu-tabs li.add ul.action-list li{ right: 10px; /* LTR */ top: 8px; } +[dir=rtl] .views-ui-dialog #views-progress-indicator { + left: 10px; + right: auto; +} .views-ui-dialog #views-progress-indicator:before { content: "\003C\00A0"; @@ -1049,6 +1101,10 @@ ul#views-display-menu-tabs li.add ul.action-list li{ list-style-position: outside; padding-left: 21px; /* LTR */ } +[dir=rtl] #views-live-preview .view-content > .item-list > ul { + padding-right: 21px; + padding-left: 0; +} /* @end */ diff --git a/core/themes/bartik/css/layout-rtl.css b/core/themes/bartik/css/layout-rtl.css deleted file mode 100644 index 77fe64b..0000000 --- a/core/themes/bartik/css/layout-rtl.css +++ /dev/null @@ -1,60 +0,0 @@ - -/* ---------- Basic Layout RTL Styles ----------- */ - -.region-header { - float: left; -} -#secondary-menu { - left: 0; - right: auto; -} - -@media all and (min-width: 560px) and (max-width: 850px) { - - #sidebar-first, - .region-triptych-first, - .region-triptych-middle, - .region-triptych-last, - .region-footer-firstcolumn, - .region-footer-secondcolumn, - .region-footer-thirdcolumn, - .region-footer-fourthcolumn { - float: right; - } - #sidebar-second { - margin-right: 50%; - } - .one-sidebar #sidebar-second { - margin-right: 0; - } -} - -@media all and (min-width: 851px) { - - #content, - #sidebar-first, - #sidebar-second, - .region-triptych-first, - .region-triptych-middle, - .region-triptych-last, - .region-footer-firstcolumn, - .region-footer-secondcolumn, - .region-footer-thirdcolumn, - .region-footer-fourthcolumn { - float: right; - } - .sidebar-first #content { - margin-left: 0; - margin-right: 25%; - } - .sidebar-second #content { - margin-right: 0; - margin-left: 25%; - } - #sidebar-first { - margin-right: -100%; - } - #sidebar-second { - margin-right: -25%; - } -} diff --git a/core/themes/bartik/css/layout.css b/core/themes/bartik/css/layout.css index 0278e40..1adacd6 100644 --- a/core/themes/bartik/css/layout.css +++ b/core/themes/bartik/css/layout.css @@ -29,6 +29,9 @@ body, margin: .5em 5px .75em; border: 1px solid #ccc; } +[dir=rtl] .region-header { + float: left; +} #secondary-menu { width: 100%; margin: 0 auto; @@ -85,6 +88,16 @@ body, float: left; /* LTR */ position: relative; } + [dir=rtl] #sidebar-first, + [dir=rtl] .region-triptych-first, + [dir=rtl] .region-triptych-middle, + [dir=rtl] .region-triptych-last, + [dir=rtl] .region-footer-firstcolumn, + [dir=rtl] .region-footer-secondcolumn, + [dir=rtl] .region-footer-thirdcolumn, + [dir=rtl] .region-footer-fourthcolumn { + float: right; + } #sidebar-first, #sidebar-second { width: 50%; @@ -92,6 +105,9 @@ body, #sidebar-second { margin-left: 50%; /* LTR */ } + [dir=rtl] #sidebar-second { + margin-right: 50%; + } .one-sidebar #sidebar-first, .one-sidebar #sidebar-second { width: 100%; @@ -99,6 +115,9 @@ body, .one-sidebar #sidebar-second { margin-left: 0; /* LTR */ } + [dir=rtl] .one-sidebar #sidebar-second { + margin-right: 0; + } .region-triptych-first, .region-triptych-middle, .region-triptych-last { @@ -157,6 +176,18 @@ body, float: left; /* LTR */ position: relative; } + [dir=rtl] #content, + [dir=rtl] #sidebar-first, + [dir=rtl] #sidebar-second, + [dir=rtl] .region-triptych-first, + [dir=rtl] .region-triptych-middle, + [dir=rtl] .region-triptych-last, + [dir=rtl] .region-footer-firstcolumn, + [dir=rtl] .region-footer-secondcolumn, + [dir=rtl] .region-footer-thirdcolumn, + [dir=rtl] .region-footer-fourthcolumn { + float: right; + } .two-sidebars #content { margin-left: 25%; margin-right: 25%; @@ -172,19 +203,33 @@ body, margin-left: 25%; /* LTR */ margin-right: 0; /* LTR */ } + [dir=rtl] .sidebar-first #content { + margin-left: 0; + margin-right: 25%; + } .sidebar-second #content { margin-right: 25%; /* LTR */ margin-left: 0; /* LTR */ } + [dir=rtl] .sidebar-second #content { + margin-right: 0; + margin-left: 25%; + } #sidebar-first { width: 25%; margin-left: -100%; /* LTR */ } + [dir=rtl] #sidebar-first { + margin-right: -100%; + } #sidebar-second { width: 25%; margin-left: -25%; /* LTR */ clear: none; } + [dir=rtl] #sidebar-second { + margin-right: -25%; + } .region-triptych-first, .region-triptych-middle, .region-triptych-last { diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index a7a36a8..0dbc9f7 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -149,6 +149,10 @@ blockquote { margin: 1.5em 10px; padding: 0.5em 10px; } +[dir=rtl] blockquote { + border-left: none; + border-right: 4px solid #afafaf; +} blockquote:before { color: #bbb; content: "\201C"; @@ -157,6 +161,9 @@ blockquote:before { margin-right: 0.2em; vertical-align: -.4em; } +[dir=rtl] blockquote:before { + content: "\201D"; +} blockquote:after { color: #bbb; content: "\201D"; @@ -164,6 +171,9 @@ blockquote:after { line-height: 0.1em; vertical-align: -.45em; } +[dir=rtl] blockquote:after { + content: "\201C"; +} blockquote > p:first-child { display: inline; } @@ -212,6 +222,10 @@ tr th { border: 1px solid #fff; text-align: left; /* LTR */ } +[dir=rtl] tr td, +[dir=rtl] tr th { + text-align: right; +} #footer-wrapper tr td, #footer-wrapper tr th { border-color: #555; @@ -242,6 +256,10 @@ table ul.links li { margin: 0; padding: 0 0 0.25em 1em; /* LTR */ } +[dir=rtl] .block ol, +[dir=rtl] .block ul { + padding: 0 1em 0.25em 0; +} .contextual-region .contextual .contextual-links a { font-size: 0.923em; text-shadow: 0 0 0 !important; @@ -277,13 +295,23 @@ ul.menu li { margin: 1em 0; padding: 0 0 0.25em 15px; /* LTR */ } +[dir=rtl] .region-content ul, +[dir=rtl] .region-content ol { + padding: 2.5em 0 0.25em 0; +} .item-list ul li { margin: 0; padding: 0.2em 0.5em 0 0; /* LTR */ } +[dir=rtl] .item-list ul li { + padding: 0.2em 0 0 0.5em; +} ul.tips { padding: 0 0 0 1.25em; /* LTR */ } +[dir=rtl] ul.tips { + padding: 0 1.25em 0 0; +} /* ------------------ Header ------------------ */ #skip-link { @@ -316,12 +344,19 @@ ul.tips { float: left; /* LTR */ padding-left: 5px; /* LTR */ } +[dir=rtl] #logo { + padding: 15px 10px 15px 15px; +} #name-and-slogan { float: left; /* LTR */ margin: 0; padding: 5px 10px 8px; } +[dir=rtl] #name-and-slogan { + margin: 0 15px 30px 0; +} + #site-name { font-size: 1.6em; color: #686868; @@ -374,6 +409,10 @@ h1#site-name { margin-right: 2px; /* LTR */ width: 120px; } +[dir=rtl] .region-header .form-text { + margin-left: 2px; + margin-right: 0; +} .region-header .form-text:hover, .region-header .form-text:focus, .region-header .form-text:active { @@ -443,6 +482,10 @@ h1#site-name { .region-header #block-user-login .item-list li.last { padding-left: 0.5em; /* LTR */ } +[dir=rtl] .region-header #block-user-login .item-list li.last { + padding-left: 0; + padding-right: 0.5em; +} .region-header #block-user-login .form-actions { margin: 4px 0 0; padding: 0; @@ -475,6 +518,14 @@ h1#site-name { padding: 0 0.5em; } +[dir=rtl] #logo, +[dir=rtl] #name-and-slogan, +[dir=rtl] .region-header .block, +[dir=rtl] .region-header #block-user-login .form-item, +[dir=rtl] .region-header #block-user-login .item-list li { + float: right; +} + /* --------------- Main Menu ------------ */ #main-menu { clear: both; @@ -485,6 +536,9 @@ h1#site-name { padding: 0; text-align: left; /* LTR */ } +[dir=rtl] #main-menu-links { + text-align: right; +} #main-menu-links li { float: none; list-style: none; @@ -504,6 +558,9 @@ h1#site-name { margin-bottom: 4px; padding: 0.9em 0 0.9em 10px; /* LTR */ } +[dir=rtl] #main-menu-links a { + padding: 0.9em 10px 0.9em 0; +} #main-menu-links a:hover, #main-menu-links a:focus { background: #f6f6f2; @@ -524,6 +581,9 @@ h1#site-name { font-size: 0.929em; margin: 0 10px; } +[dir=rtl] #secondary-menu-links { + float: left; +} #secondary-menu-links li{ margin: 0; padding: 0; @@ -633,6 +693,11 @@ h1#page-title { float: left; /* LTR */ margin: 1px 20px 0 0; /* LTR */ } +[dir=rtl] .submitted .field-name-field-user-picture img { + float: right; + margin-left: 20px; + margin-right: 0; +} .field-type-taxonomy-term-reference { margin: 0 0 1.2em; } @@ -641,6 +706,10 @@ h1#page-title { margin: 0; padding-right: 5px; /* LTR */ } +[dir=rtl] .field-type-taxonomy-term-reference .field-label { + padding-left: 5px; + padding-right: 0; +} .field-type-taxonomy-term-reference .field-label, .field-type-taxonomy-term-reference ul.links { font-size: 0.8em; @@ -659,9 +728,18 @@ h1#page-title { padding: 0 1em 0 0; /* LTR */ white-space: nowrap; } +[dir=rtl] .field-type-taxonomy-term-reference ul.links li { + padding: 0 0 0 1em; + float: right; +} .link-wrapper { text-align: right; } +[dir=rtl] .link-wrapper { + text-align: left; + margin-right: 236px; + margin-left: 0; +} .field-type-image img, .field-name-field-user-picture img { margin: 0 0 1em; @@ -687,6 +765,9 @@ ul.links { .comment .field-name-field-user-picture img { margin-left: 0; /* LTR */ } +[dir=rtl] .comment .field-name-field-user-picture img { + margin-right: 0; +} .comment { margin-bottom: 20px; display: table; @@ -698,6 +779,10 @@ ul.links { vertical-align: top; overflow: hidden; } +[dir=rtl] .comment .attribution { + float: right; + padding: 0 0 0 30px; +} .comment .attribution img { margin: 0; border: 1px solid #d3d7d9; @@ -731,6 +816,11 @@ ul.links { position: absolute; width: 20px; } +[dir=rtl] .comment .comment-arrow { + background-image: url(../images/comment-arrow-rtl.gif); + margin-left: 0; + margin-right: -47px; +} .comment .comment-text { padding: 10px 25px; border: 1px solid #d3d7d9; @@ -742,16 +832,28 @@ ul.links { .comment .indented { margin-left: 40px; /* LTR */ } +[dir=rtl] .comment .indented { + margin-right: 40px; + margin-left: 0; +} .comment ul.links { padding: 0 0 0.25em 0; } .comment ul.links li { padding: 0 0.5em 0 0; /* LTR */ } +[dir=rtl] .comment ul.links li { + padding: 0 0 0.5em; +} .comment.unpublished { margin-right: 5px; /* LTR */ padding: 5px 2px 5px 5px; /* LTR */ } +[dir=rtl] .comment.unpublished { + margin-left: 5px; + margin-right: 0; + padding: 5px 5px 5px 2px; +} .comment.unpublished .comment-text .comment-arrow { border-left: 1px solid #fff4f4; border-right: 1px solid #fff4f4; @@ -908,6 +1010,9 @@ ul.links { padding-left: 0; /* LTR */ margin-left: 0; } +[dir=rtl] #footer-columns .content ul { + padding-right: 0; +} #footer-columns .content li { list-style: none; margin: 0; @@ -921,6 +1026,9 @@ ul.links { padding: 0.8em 2px 0.8em 20px; /* LTR */ text-indent: -15px; } +[dir=rtl] #footer-columns .content li a { + padding: 0.8em 20px 0.8em 2px; +} #footer-columns .content li a:hover, #footer-columns .content li a:focus { background-color: #1f1f21; @@ -952,13 +1060,28 @@ ul.links { border-right: 1px solid #555; /* LTR */ border-color: rgba(255, 255, 255, 0.15); } +[dir=rtl] #footer li a { + float: right; + border-left: 1px solid #555; + border-color: rgba(255, 255, 255, 0.15); + border-right: none; +} #footer li.first a { padding-left: 0; /* LTR */ } +[dir=rtl] #footer li.first a { + padding-right: 0; + padding-left: 12px; +} #footer li.last a { padding-right: 0; /* LTR */ border-right: none; /* LTR */ } +[dir=rtl] #footer li.last a { + padding-left: 0; + padding-right: 12px; + border-left: none; +} #footer-wrapper tr.odd { background-color: transparent; } @@ -990,6 +1113,11 @@ div.tabs { vertical-align: bottom; margin: 0 5px 0 0; /* LTR */ } +[dir=rtl] .tabs ul.primary li { + margin: 0 0 0 5px; + float: right; + zoom: 1; +} .tabs ul.primary li.active a { border-bottom: 1px solid #ffffff; } @@ -1027,12 +1155,23 @@ div.tabs { margin: 0; padding: 0 1em; } +[dir=rtl] .tabs ul.secondary li { + border-left: 1px solid #ccc; + border-right: none; + float: right; +} .tabs ul.secondary li:last-child { border-right: none; /* LTR */ } +[dir=rtl] .tabs ul.secondary li:last-child { + border-left: none; +} .tabs ul.secondary li:first-child { padding-left: 0; /* LTR */ } +[dir=rtl] .tabs ul.secondary li:first-child { + padding-right: 0; +} .tabs ul.secondary li a { display: inline; padding: 0.25em 0.5em; @@ -1072,6 +1211,14 @@ div.messages { /* -------------- Password Meter ------------- */ +[dir=rtl] #password-strength { + left: auto; + margin-top: 2em; + right: 16em; +} +[dir=rtl] .form-item-pass-pass2 label { + clear: right; +} .confirm-parent, .password-parent { width: 34em; @@ -1088,6 +1235,10 @@ div.password-confirm { .password-strength-text { margin-top: 0.2em; } +[dir=rtl] #password-strength-text { + margin-top: 0; + float: left; +} div.password-confirm { margin-top: 2.2em; width: 20.73em; @@ -1119,6 +1270,14 @@ div.password-confirm { /* -------------- Form Elements ------------- */ +[dir=rtl] #user-profile-form input#edit-submit { + margin-left: 0; +} +[dir=rtl] .password-suggestions ul li { + margin-right: 1.2em; + margin-left: 0; +} + details, fieldset, .filter-wrapper { @@ -1254,9 +1413,15 @@ input.form-submit:focus { .js input.form-autocomplete { background-position: 100% 4px; /* LTR */ } +.js[dir=rtl] input.form-autocomplete { + background-position: 1% 4px; +} .js input.throbbing { background-position: 100% -16px; /* LTR */ } +.js[dir=rtl] input.throbbing { + background-position: 1% -16px; +} /* Comment form */ .comment-form label { @@ -1264,6 +1429,9 @@ input.form-submit:focus { font-size: 0.929em; width: 120px; } +[dir=rtl] .comment-form label { + float: right; +} .comment-form input, .comment-form .form-select { margin: 0; @@ -1283,6 +1451,12 @@ input.form-submit:focus { .comment-form .form-radios { margin-left: 120px; /* LTR */ } +[dir=rtl] .comment-form .form-type-checkbox, +[dir=rtl] .comment-form .form-radios, +[dir=rtl] .comment-form .form-item .description { + margin-left: 0; + margin-right: 120px; +} .comment-form .form-type-checkbox label, .comment-form .form-radios label { float: none; @@ -1333,6 +1507,10 @@ input.form-submit:focus { #edit-actions input { margin-right: 0.6em; /* LTR */ } +[dir=rtl] #edit-actions input { + margin-left: 0.6em; + margin-right: 0; +} /* -------------- Other Overrides ------------- */ @@ -1350,6 +1528,20 @@ div.password-suggestions { font-size: 1em; } +/* ---------- Color Form ----------- */ + +[dir=rtl] .color-form #palette { + margin-left: 0; + margin-right: 20px; +} +[dir=rtl] .color-form .form-item label { + float: right; +} +[dir=rtl] .color-form #palette .lock { + right: -20px; + left: 0; +} + /* --------------- Search Form ---------------- */ #block-search-form { @@ -1375,6 +1567,12 @@ div.password-suggestions { margin-right: 5px; width: 9em; } +[dir=rtl] #search-form input#edit-keys, +[dir=rtl] #block-search-form .form-item-search-block-form input { + float: right; + margin-left: 5px; + margin-right: 0; +} #search-block-form input.form-submit, #search-form input.form-submit { margin-left: 0; @@ -1426,6 +1624,9 @@ ol.search-results { float: left; /* LTR */ margin: 0; } +[dir=rtl] .shortcut-wrapper h1#page-title { + float: right; +} div.add-or-remove-shortcuts { padding-top: 0.9em; } @@ -1554,6 +1755,9 @@ div.admin-panel .description { #logo { padding: 5px 0 0 5px; /* LTR */ } + [dir=rtl] #logo { + padding: 5px 5px 0 0; + } #name-and-slogan { padding: 10px 10px 8px; } @@ -1569,9 +1773,18 @@ div.admin-panel .description { display: inline-block; width: 32.75%; } + [dir=rtl] #main-menu-links li { + float: right; + margin-left: 5px; + margin-right: 0; + } #main-menu-links li:nth-child(3n) { margin-right: -5px; /* LTR */ } + [dir=rtl] #main-menu-links li:nth-child(3n) { + margin-left: -5px; + margin-right: 0; + } #main-menu-links a { float: none; display: block; @@ -1589,10 +1802,16 @@ div.admin-panel .description { #logo { padding: 15px 15px 15px 10px; /* LTR */ } + [dir=rtl] #logo { + padding: 15px 10px 15px 15px; + } #name-and-slogan { padding: 26px 0 0; margin: 0 0 30px 15px; /* LTR */ } + [dir=rtl] #name-and-slogan { + margin: 0 15px 30px 0; + } #site-name { font-size: 1.821em; } @@ -1608,6 +1827,9 @@ div.admin-panel .description { margin: 0 1px; width: auto; } + [dir=rtl] #main-menu-links li { + float: right; + } #main-menu-links a { float: left; /* LTR */ padding: 0.7em 0.8em; @@ -1615,6 +1837,10 @@ div.admin-panel .description { border-bottom-left-radius: 0; border-bottom-right-radius: 0; } + [dir=rtl] #main-menu-links a { + float: right; + padding: 0.7em 0.8em; + } .featured #main-menu-links li a:active, .featured #main-menu-links li a.active { background: #f0f0f0; @@ -1669,6 +1895,11 @@ div.admin-panel .description { padding-left: 0; /* LTR */ } +[dir=rtl] .views-display-top .secondary .action-list { + padding-left: inherit; + padding-right: 0; +} + /* @end */ /* @group Attachment details tabs @@ -1754,6 +1985,9 @@ div.admin-panel .description { .views-display-columns details summary { padding: 0 0 4px 2px; /* LTR */ } +[dir=rtl] .views-display-columns details summary { + padding: 0 2px 4px 0; +} .views-display-columns a.fieldset-title { color: #0071B3; diff --git a/core/themes/seven/style-rtl.css b/core/themes/seven/style-rtl.css deleted file mode 100644 index 70770d1..0000000 --- a/core/themes/seven/style-rtl.css +++ /dev/null @@ -1,219 +0,0 @@ -/** - * Generic elements. - */ -dl dd, -dl dl { - margin-right: 20px; -} -ul, -.block ul, -.item-list ul { - margin: 0.25em 1.5em 0.25em 0; -} -ol { - margin: 0.25em 2em 0.25em 0; -} - -/** - * Skip link. - */ -#skip-link { - right: 50%; - margin-right: -5.25em; -} -#skip-link a, -#skip-link a:link, -#skip-link a:visited { - padding: 1px 10px 2px 10px; -} - -/** - * Branding. - */ -#branding { - padding: 20px 20px 0 20px; -} - -/** - * Help. - */ -#help div.more-help-link { - text-align: left; -} - -/** - * Page title. - */ -#branding h1.page-title { - float: right; -} - -/** - * Tabs. - */ -ul.primary li, -ul.primary li a:link, -ul.primary li a.active { - float: right; -} -ul.primary, -ul.secondary { - float: left; -} -ul.secondary li { - float: none; -} -ul.primary { - padding-top: 0; -} - -/** - * Page layout. - */ -ul.links li, -ul.inline li { - padding-left: 1em; - padding-right: 0; -} -.admin-list li a { - background: url(images/list-item-rtl.png) no-repeat right 11px; - padding: 9px 39px 9px 9px; -} - -/** - * Tables. - */ -table th.active a { - padding: 0 0 0 25px; -} -table th.active img { - left: 3px; - right: auto; -} -/** - * Exception for webkit bug with the right border of the last cell - * in some tables, since it's webkit only, we can use :last-child - */ -tr td:last-child { - border-left: 1px solid #bebfb9; - border-right: none; -} - -/* Filter */ -ul.tips li { - margin: 0.25em 1.5em 0.25em 0; -} -body div.form-type-radio div.description, -body div.form-type-checkbox div.description { - margin-left: 0; - margin-right: 1.5em; -} - -/* Update options. */ -div.admin-options label, -div.admin-options div.form-item { - margin-left: 10px; - margin-right: 0; - float: right; -} - -/* Maintenance theming */ -body.in-maintenance #sidebar-first { - float: right; -} -body.in-maintenance #content { - float: left; - padding-left: 20px; - padding-right: 0; -} -ol.task-list { - margin-right: 0; -} -ol.task-list li { - padding: 0.5em 20px 0.5em 1em; -} -ol.task-list li.active { - background: transparent url(images/task-item-rtl.png) no-repeat right 50%; - padding: 0.5em 20px 0.5em 1em; -} - -/* Overlay theming */ -.overlay #branding .breadcrumb { - float: right; -} -.overlay ul.secondary { - margin: -1.4em 0 0.3em 0; -} - -/* Recent content block */ -#block-node-recent .more-link { - padding: 0 0 5px 5px; -} - -/** - * Improve spacing of cancel link. - */ -#edit-cancel { - margin-right: 10px; -} - -/** - * Views styling - */ - /* @group Forms */ - -.views-admin .form-submit, -.views-admin a.button { - margin-left: 0; -} - -/* @end */ - -/* @group Lists */ - -.views-admin .links li { - padding-left: 0; -} - -/* @end */ - -/* @group Attachments */ - -.views-displays .secondary { - text-align: right; -} - -/* @end */ - -/* @group Attachment details tabs */ - -.views-display-top ul.secondary { - float: right; -} - -.views-displays .secondary .action-list li:first-child { - -moz-border-radius: 7px 0 0 0; - -webkit-border-radius: 7px 0 0 0; - border-radius: 7px 0 0 0; -} - -/* @end */ - - -/** - * Node Add/Edit Page Layout - */ - -/* Narrow screens */ -/*.overlay .layout-region-secondary { - -moz-box-shadow: inset -0.15em 0.3em .5em rgba(0, 0, 0, .1); - -webkit-box-shadow: inset -0.15em 0.3em .5em rgba(0, 0, 0, .1); - box-shadow: inset -0.15em 0.3em .5em rgba(0, 0, 0, .1); -}*/ -/* Wide screens */ -@media only screen and (min-width: 780px) { - .overlay [id="edit-additional-settings"] { - -webkit-box-shadow: inset -3px 3px 5px rgba(0, 0, 0, .15); - box-shadow: inset -3px 3px 5px rgba(0, 0, 0, .15); - } -} diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css index 052d0f1..319f1ed 100644 --- a/core/themes/seven/style.css +++ b/core/themes/seven/style.css @@ -63,6 +63,10 @@ dl dl { margin-left: 20px; /* LTR */ margin-bottom: 10px; } +[dir=rtl] dl dd, +[dir=rtl] dl dl { + margin-right: 20px; +} blockquote { margin: 1em 40px; } @@ -107,6 +111,11 @@ ul, list-style-image: none; margin: 0.25em 0 0.25em 1.5em; /* LTR */ } +[dir=rtl] ul, +[dir=rtl] .block ul, +[dir=rtl] .item-list ul { + margin: 0.25em 1.5em 0.25em 0; +} .item-list .pager li { padding: 0.5em; } @@ -123,6 +132,9 @@ ol { list-style-type: decimal; margin: 0.25em 0 0.25em 2em; /* LTR */ } +[dir=rtl] ol { + margin: 0.25em 2em 0.25em 0; +} .item-list ul li.collapsed, ul.menu li.collapsed { list-style-image:url(../../misc/menu-collapsed.png); @@ -158,6 +170,10 @@ pre { width: auto; z-index: 50; } +[dir=rtl] #skip-link { + right: 50%; + margin-right: -5.25em; +} #skip-link a, #skip-link a:link, #skip-link a:visited { @@ -169,6 +185,11 @@ pre { text-decoration: none; border-radius: 0 0 10px 10px; } +[dir=rtl] #skip-link a, +[dir=rtl] #skip-link a:link, +[dir=rtl] #skip-link a:visited { + padding: 1px 10px 2px 10px; +} #skip-link a:hover, #skip-link a:focus, #skip-link a:active { @@ -184,6 +205,9 @@ pre { position: relative; background-color: #e0e0d8; } +[dir=rtl] #branding { + padding: 20px 20px 0 20px; +} .breadcrumb { font-size: 0.846em; line-height: 1em; @@ -202,6 +226,9 @@ pre { #help div.more-help-link { text-align: right; /* LTR */ } +[dir=rtl] #help div.more-help-link { + text-align: left; +} /** * Page title. @@ -218,6 +245,9 @@ pre { font-weight: normal; float: left; /* LTR */ } +[dir=rtl] #branding h1.page-title { + float: right; +} /** * Console. @@ -260,6 +290,11 @@ ul.primary li.active a { border-color: #a6a7a2; border-radius: 8px 8px 0 0; } +[dir=rtl] ul.primary li, +[dir=rtl] ul.primary li a:link, +[dir=rtl] ul.primary li a.active { + float: right; +} ul.primary li.active a, ul.primary li.active a.active, ul.primary li.active a:active, @@ -306,6 +341,10 @@ ul.secondary li.active a.active { color: #fff; background: #666; } +[dir=rtl] ul.primary, +[dir=rtl] ul.secondary { + float: left; +} #content { clear: left; } @@ -383,6 +422,11 @@ ul.links li, ul.inline li { padding-right: 1em; /* LTR */ } +[dir=rtl] ul.links li, +[dir=rtl] ul.inline li { + padding-left: 1em; + padding-right: 0; +} ul.inline li { display: inline; } @@ -407,6 +451,10 @@ ul.inline li { padding: 9px 9px 9px 39px; /* LTR */ min-height: 0; } +[dir=rtl] .admin-list li a { + background: url(images/list-item-rtl.png) no-repeat right 11px; + padding: 9px 39px 9px 9px; +} .admin-list.compact li a { background-image: none; padding: 2px 19px; @@ -477,11 +525,27 @@ table th a { table th.active a { padding: 0 25px 0 0; /* LTR */ } +[dir=rtl] table th.active a { + padding: 0 0 0 25px; +} table th.active img { position: absolute; top: 3px; right: 3px; /* LTR */ } +[dir=rtl] table th.active img { + left: 3px; + right: auto; +} +/** + * Exception for webkit bug with the right border of the last cell + * in some tables, since it's webkit only, we can use :last-child + */ +[dir=rtl] tr td:last-child { + border-left: 1px solid #bebfb9; + border-right: none; +} + /** * Force browsers to calculate the width of a 'select all' TH element. */ @@ -600,10 +664,18 @@ div.description, ul.tips li { margin: 0.25em 0 0.25em 1.5em; /* LTR */ } +[dir=rtl] ul.tips li { + margin: 0.25em 1.5em 0.25em 0; +} body div.form-type-radio div.description, body div.form-type-checkbox div.description { margin-left: 1.5em; /* LTR */ } +[dir=rtl] body div.form-type-radio div.description, +[dir=rtl] body div.form-type-checkbox div.description { + margin-left: 0; + margin-right: 1.5em; +} .button { cursor: pointer; padding: 4px 17px; @@ -757,6 +829,9 @@ select.form-select:focus { #edit-cancel { margin-left: 10px; /* LTR */ } +[dir=rtl] #edit-cancel { + margin-right: 10px; +} /** * Improve form element usability on narrow devices. @@ -899,6 +974,12 @@ div.admin-options div.form-item { margin-right: 10px; /* LTR */ float: left; /* LTR */ } +[dir=rtl] div.admin-options label, +[dir=rtl] div.admin-options div.form-item { + margin-left: 10px; + margin-right: 0; + float: right; +} div.admin-options div.form-item { padding: 0; border: 0; @@ -915,12 +996,20 @@ body.in-maintenance #sidebar-first { max-width: 200px; width: 25%; } +[dir=rtl] body.in-maintenance #sidebar-first { + float: right; +} body.in-maintenance #content { float: right; /* LTR */ max-width: 550px; clear: none; width: 72%; } +[dir=rtl] body.in-maintenance #content { + float: left; + padding-left: 20px; + padding-right: 0; +} body.in-maintenance #page { max-width: 770px; margin: 0 auto; @@ -961,15 +1050,25 @@ ol.task-list { list-style-type: none; list-style-image: none; } +[dir=rtl] ol.task-list { + margin-right: 0; +} ol.task-list li { padding: 0.5em 1em 0.5em 20px; /* LTR */ color: #adadad; } +[dir=rtl] ol.task-list li { + padding: 0.5em 20px 0.5em 1em; +} ol.task-list li.active { background: transparent url(images/task-item.png) no-repeat 3px 50%; /* LTR */ padding: 0.5em 1em 0.5em 20px; /* LTR */ color: #000; } +[dir=rtl] ol.task-list li.active { + background: transparent url(images/task-item-rtl.png) no-repeat right 50%; + padding: 0.5em 20px 0.5em 1em; +} ol.task-list li.done { background: transparent url(images/task-check.png) no-repeat 0 50%; color: green; @@ -1012,6 +1111,9 @@ body.in-maintenance #branding .step-indicator { position: relative; z-index: 10; } +[dir=rtl] .overlay #branding .breadcrumb { + float: right; +} #overlay-tabs { bottom: -1px; font-size: 1.54em; @@ -1023,6 +1125,9 @@ body.in-maintenance #branding .step-indicator { margin: -1.4em 0 0.3em 0; /* LTR */ overflow: visible; } +[dir=rtl] .overlay ul.secondary { + margin: -1.4em 0 0.3em 0; +} .overlay #content { padding: 0; } @@ -1104,6 +1209,9 @@ h1#overlay-title { #block-node-recent .more-link { padding: 0 5px 5px 0; /* LTR */ } +[dir=rtl] #block-node-recent .more-link { + padding: 0 0 5px 5px; +} /* Dropbutton */ .js .dropbutton-widget { @@ -1213,6 +1321,12 @@ details.fieldset-no-legend { margin-right: 0; /* LTR */ margin-top: 0; } +[dir=rtl] .views-admin input.form-submit, +[dir=rtl] .views-ui-dialog input.form-submit, +[dir=rtl] .views-admin a.button, +[dir=rtl] .views-ui-dialog a.button{ + margin-left: 0; +} /* Override for a button on the edit display screen */ #edit-displays-preview-controls .form-submit { @@ -1263,6 +1377,10 @@ details.fieldset-no-legend { padding: 0; } +[dir=rtl] .views-displays ul.secondary { + text-align: right; +} + .views-displays ul.secondary li a, .views-displays ul.secondary li.active a, .views-displays ul.secondary li.active a.active { @@ -1281,6 +1399,9 @@ details.fieldset-no-legend { .views-admin .links li { padding-right: 0; /* LTR */ } +[dir=rtl] .views-admin .links li { + padding-left: 0; +} .views-admin .button .links li { padding-right: 12px; /* LTR */ @@ -1290,11 +1411,19 @@ details.fieldset-no-legend { background-color: transparent; float: left } +[dir=rtl] .views-display-top ul.secondary { + float: right; +} .views-display-top .secondary .action-list li { float: none; margin: 0; } +[dir=rtl] .views-displays .secondary .action-list li:first-child { + -moz-border-radius: 7px 0 0 0; + -webkit-border-radius: 7px 0 0 0; + border-radius: 7px 0 0 0; +} /* @end */ @@ -1652,6 +1781,10 @@ details.fieldset-no-legend { .overlay .layout-region-node-footer { padding-bottom: 1.5em; } + [dir=rtl] .overlay [id="edit-additional-settings"] { + -webkit-box-shadow: inset -3px 3px 5px rgba(0, 0, 0, .15); + box-shadow: inset -3px 3px 5px rgba(0, 0, 0, .15); + } } @media screen and (max-width: 1020px), @@ -1672,7 +1805,6 @@ details.fieldset-no-legend { } } - /** * Node form dropbuttons. */ diff --git a/core/themes/seven/vertical-tabs-rtl.css b/core/themes/seven/vertical-tabs-rtl.css deleted file mode 100644 index 9181ee9..0000000 --- a/core/themes/seven/vertical-tabs-rtl.css +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Override of misc/vertical-tabs-rtl.css. - */ -.vertical-tabs-list { - float: right; - margin: 0 0 -1px -100%; -} -.vertical-tab-button.selected { - border-left: 1px solid #fcfcfa; -} -.vertical-tabs-panes { - margin: 0 240px 0 0; - border-right: 1px solid #a6a5a1; -} diff --git a/core/themes/seven/vertical-tabs.css b/core/themes/seven/vertical-tabs.css index 90f85fa..409fd5c 100644 --- a/core/themes/seven/vertical-tabs.css +++ b/core/themes/seven/vertical-tabs.css @@ -17,6 +17,10 @@ border-bottom: 1px solid #ccc; line-height: 1; } +[dir=rtl] .vertical-tabs-list { + float: right; + margin: 0 0 -1px -100%; +} .vertical-tab-button { position: relative; margin: 0; @@ -30,6 +34,9 @@ border-right: 1px solid #fcfcfa; /* LTR */ box-shadow: 0 5px 5px -5px hsla(0, 0%, 0%, 0.3); } +[dir=rtl] .vertical-tab-button.selected { + border-left: 1px solid #fcfcfa; +} .vertical-tab-button:focus, .vertical-tab-button:active { z-index: 2; @@ -66,6 +73,10 @@ border-left: 1px solid #a6a5a1; /* LTR */ background-color: #fcfcfa; } +[dir=rtl] .vertical-tabs-panes { + margin: 0 240px 0 0; + border-right: 1px solid #a6a5a1; +} .vertical-tabs-panes:after { content: ""; display: table; diff --git a/core/themes/stark/css/layout-rtl.css b/core/themes/stark/css/layout-rtl.css deleted file mode 100644 index d5e9c6d..0000000 --- a/core/themes/stark/css/layout-rtl.css +++ /dev/null @@ -1,52 +0,0 @@ -@media all and (min-width: 480px) and (max-width: 959px) { - body.sidebar-first #content, - body.two-sidebars #content { - float: left; - } - body.sidebar-second #content { - float: right; - } - - #sidebar-first { - float: right; - } - - #sidebar-second { - float: left; - } - body.two-sidebars #sidebar-second { - float: right; - clear: right; - } - body.two-sidebars #sidebar-second .block { - float: right; - } -} - -@media all and (min-width: 960px) { - #content { - float: right; - } - body.sidebar-first #content { - left: 0; - right: 20%; - } - body.two-sidebars #content { - left: 0; - right: 20%; - } - - #sidebar-first { - float: right; - left: 0; - right: -80%; - } - body.two-sidebars #sidebar-first { - left: 0; - right: -60%; - } - - #sidebar-second { - float: left; - } -} diff --git a/core/themes/stark/css/layout.css b/core/themes/stark/css/layout.css index 39f533b..9c1ad2f 100644 --- a/core/themes/stark/css/layout.css +++ b/core/themes/stark/css/layout.css @@ -33,29 +33,49 @@ img { width: 67%; float: right; /* LTR */ } + [dir=rtl] body.sidebar-first #content, + [dir=rtl] body.two-sidebars #content { + float: left; + } body.sidebar-second #content { width: 67%; float: left; /* LTR */ } + [dir=rtl] body.sidebar-second #content { + float: right; + } #sidebar-first { width: 33%; float: left; /* LTR */ } + [dir=rtl] #sidebar-first { + float: right; + } #sidebar-second { width: 33%; float: right; /* LTR */ } + [dir=rtl] #sidebar-second { + float: left; + } body.two-sidebars #sidebar-second { clear: both; width: 100%; } + [dir=rtl] body.two-sidebars #sidebar-second { + float: right; + clear: right; + } body.two-sidebars #sidebar-second .block { float: left; /* LTR */ width: 33%; } + [dir=rtl] body.two-sidebars #sidebar-second .block { + float: right; + } body.two-sidebars #sidebar-second .block:nth-child(3n+1) { clear: both; } @@ -66,10 +86,17 @@ img { width: 100%; float: left; /* LTR */ } + [dir=rtl] #content { + float: right; + } body.sidebar-first #content { width: 80%; left: 20%; /* LTR */ } + [dir=rtl] body.sidebar-first #content { + left: 0; + right: 20%; + } body.sidebar-second #content { width: 80%; } @@ -77,20 +104,36 @@ img { width: 60%; left: 20%; /* LTR */ } + [dir=rtl] body.two-sidebars #content { + left: 0; + right: 20%; + } #sidebar-first { width: 20%; float: left; /* LTR */ left: -80%; /* LTR */ } + [dir=rtl] #sidebar-first { + float: right; + left: 0; + right: -80%; + } body.two-sidebars #sidebar-first { left: -60%; /* LTR */ } + [dir=rtl] body.two-sidebars #sidebar-first { + left: 0; + right: -60%; + } #sidebar-second { float: right; /* LTR */ width: 20%; } + [dir=rtl] #sidebar-second { + float: left; + } } /**