Commit bfba7b8d authored by alexpott's avatar alexpott

Issue #2015789 by fubhy, echoz, rteijeiro, LewisNyman, penyaskito: Remove...

Issue #2015789 by fubhy, echoz, rteijeiro, LewisNyman, penyaskito: Remove language_css_alter() (RTL stylesheets) in favor of HTML 'dir' attribute.
parent f74d2981
......@@ -2997,7 +2997,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();
......
/**
* @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;
}
......@@ -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;
......
/**
* @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;
}
......@@ -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;
}
body {
direction: rtl;
}
th {
text-align: right;
}
......@@ -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;
}
......
.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;
}
......@@ -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;
}
......
/**
* @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;
}
......@@ -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;
}
/**
* @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;
}
......@@ -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;
......@@ -174,6 +195,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;
......
/**
* @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;
}
......@@ -13,6 +13,10 @@
top: 0;
right: 0; /* LTR */
}
[dir=rtl] #placeholder {
left: 0;
right: auto;
}
/* Palette */
.color-form .form-item {
......@@ -21,39 +25,67 @@
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;
width: 16px;
height: 16px;
}
[dir=rtl] #palette .hook {
float: right;
}
#palette .down,
#palette .up,
#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 +96,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 +119,6 @@
position: relative;
float: left; /* LTR */
}
.js[dir=rtl] #preview {
float: right;
}
/**
* @file
* RTL styles for comment module.
*/
/**
* Indent threaded comments.
*/
.indented {
margin-left: 0;
margin-right: 25px;
}
......@@ -10,3 +10,7 @@
.indented {
margin-left: 25px; /* LTR */
}
[dir=rtl] .indented {
margin-left: 0;
margin-right: 25px;
}
/**
* @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;
}
......@@ -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;
......
/**
* @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;
}
......@@ -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)));
......
/**
* @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;
}
......@@ -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;
......
.entity_reference-settings {
margin-right: 1.5em;
}
......@@ -2,3 +2,6 @@
.entity_reference-settings {
margin-left: 1.5em; /* LTR */
}
[dir=rtl] .entity_reference-settings {
margin-right: 1.5em;
}
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;
}
......@@ -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;
}
/**
* @file
* Right-to-left specific stylesheet for the Field UI module.
*/
/* 'Manage fields' overview */
.field-ui-overview .add-new .label-input {
float: right;
}
......@@ -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;
}
......
/**
* @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.
*/