Use CSSJanus via a Grunt task to generate right-to-left CSS.
RTL files are now created on build for core CSS files. These files replace the LTR file completely, rather than being in addition to the existing LTR file. Benefits: * For the user: less CSS is served in RTL, less HTTP requests on the frontend, and less work for the browser. * For the core developer: Let the tools do the work. Notes for core development: * The file generation task is `grunt rtl`. * `grunt watch` now handles generating RTL files in /build when a CSS file in /src is saved. * /src is now locked to LTR. RTL testing must occur via /build. When attempting to run an RTL text direction with /src, an admin notice will display. Expect RTL bugs. Please report them. props yoavf. see #24977. git-svn-id: https://develop.svn.wordpress.org/trunk@26107 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e2922ff103
commit
d416108af5
58
Gruntfile.js
58
Gruntfile.js
@ -88,6 +88,42 @@ module.exports = function(grunt) {
|
||||
// Exceptions
|
||||
'!wp-admin/css/farbtastic.css'
|
||||
]
|
||||
},
|
||||
rtl: {
|
||||
expand: true,
|
||||
cwd: BUILD_DIR,
|
||||
dest: BUILD_DIR,
|
||||
ext: '.min.css',
|
||||
src: [
|
||||
'wp-admin/css/*-rtl.css',
|
||||
'wp-includes/css/*-rtl.css'
|
||||
]
|
||||
}
|
||||
},
|
||||
cssjanus: {
|
||||
core: {
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
dest: BUILD_DIR,
|
||||
ext: '-rtl.css',
|
||||
src: [
|
||||
'wp-admin/css/*.css',
|
||||
'wp-includes/css/*.css',
|
||||
// Temporary exceptions while .rtl body classes are in use
|
||||
'!wp-admin/css/colors-fresh.css',
|
||||
'!wp-admin/css/install.css',
|
||||
'!wp-includes/css/editor.css',
|
||||
'!wp-includes/css/wp-pointer.css',
|
||||
// Farbtastic is deprecated, uses .rtl classes.
|
||||
'!wp-admin/css/farbtastic.css'
|
||||
]
|
||||
},
|
||||
dynamic: {
|
||||
expand: true,
|
||||
cwd: SOURCE_DIR,
|
||||
dest: BUILD_DIR,
|
||||
ext: '-rtl.css',
|
||||
src: []
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
@ -257,6 +293,17 @@ module.exports = function(grunt) {
|
||||
interval: 2000
|
||||
}
|
||||
},
|
||||
rtl: {
|
||||
files: [
|
||||
SOURCE_DIR + 'wp-admin/css/*.css',
|
||||
SOURCE_DIR + 'wp-includes/css/*.css'
|
||||
],
|
||||
tasks: ['cssjanus:dynamic'],
|
||||
options: {
|
||||
spawn: false,
|
||||
interval: 2000
|
||||
}
|
||||
},
|
||||
test: {
|
||||
files: ['tests/qunit/**'],
|
||||
tasks: ['qunit']
|
||||
@ -269,9 +316,12 @@ module.exports = function(grunt) {
|
||||
// Copy task.
|
||||
grunt.registerTask('copy:all', ['copy:files', 'copy:version']);
|
||||
|
||||
// RTL task.
|
||||
grunt.registerTask('rtl', ['cssjanus:core']);
|
||||
|
||||
// Build task.
|
||||
grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'uglify:core',
|
||||
'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);
|
||||
grunt.registerTask('build', ['clean:all', 'copy:all', 'rtl', 'cssmin:core', 'cssmin:rtl',
|
||||
'uglify:core', 'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);
|
||||
|
||||
// Testing tasks.
|
||||
grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() {
|
||||
@ -293,8 +343,9 @@ module.exports = function(grunt) {
|
||||
//
|
||||
// On `watch:all`, automatically updates the `copy:dynamic` and `clean:dynamic`
|
||||
// configurations so that only the changed files are updated.
|
||||
// On `watch:rtl`, automatically updates the `cssjanus:dynamic` configuration.
|
||||
grunt.event.on('watch', function( action, filepath, target ) {
|
||||
if ( target !== 'all' ) {
|
||||
if ( target !== 'all' && target !== 'rtl' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -304,5 +355,6 @@ module.exports = function(grunt) {
|
||||
|
||||
grunt.config(['clean', 'dynamic', 'src'], cleanSrc);
|
||||
grunt.config(['copy', 'dynamic', 'src'], copySrc);
|
||||
grunt.config(['cssjanus', 'dynamic', 'src'], copySrc);
|
||||
});
|
||||
};
|
||||
|
@ -19,6 +19,7 @@
|
||||
"grunt-contrib-compress": "~0.5.2",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-jshint": "~0.7.0",
|
||||
"grunt-cssjanus": "~0.1.0",
|
||||
"matchdep": "~0.1.2"
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
.wp-color-result {
|
||||
margin: 0 0 6px 6px;
|
||||
padding-left: 0;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.wp-color-result:after {
|
||||
border-radius: 0 0 1px 1px;
|
||||
border-left: 0;
|
||||
border-right: 1px solid #bbb;
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.wp-color-result:hover {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
.wp-color-result:hover:after {
|
||||
border-left: 0;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
.wp-picker-container .button {
|
||||
margin-left: 0;
|
||||
margin-right: 6px;
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
#customize-header-actions .button-primary {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#customize-header-actions .spinner {
|
||||
float: left;
|
||||
margin-right: 0;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.customize-control {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.customize-control-radio input,
|
||||
.customize-control-checkbox input {
|
||||
margin-right: 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dropdowns
|
||||
*/
|
||||
.accordion-section .dropdown {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.accordion-section .dropdown-content {
|
||||
float: right;
|
||||
margin-right: 0px;
|
||||
margin-left: 16px;
|
||||
-webkit-border-radius: 0 3px 3px 0;
|
||||
border-radius: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
.customize-control .dropdown-arrow {
|
||||
right: auto;
|
||||
left: 0;
|
||||
|
||||
border-color: #ccc;
|
||||
border-style: solid;
|
||||
border-width: 1px 0 1px 1px;
|
||||
-webkit-border-radius: 3px 0 0 3px;
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.customize-control .dropdown-arrow:after {
|
||||
right: auto;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Color Picker
|
||||
*/
|
||||
.customize-control-color .dropdown {
|
||||
margin-right: 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.accordion-section input[type="text"].color-picker-hex {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Image Picker
|
||||
*/
|
||||
.accordion-section .customize-control-image .actions {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.customize-control-image .library,
|
||||
.customize-control-image .actions,
|
||||
.accordion-section .customize-control-image .library ul,
|
||||
.accordion-section .customize-control-image .library li,
|
||||
.accordion-section .customize-control-image .library-content {
|
||||
float: right;
|
||||
}
|
@ -1,236 +0,0 @@
|
||||
|
||||
body {
|
||||
direction: rtl;
|
||||
width: 99.5%;
|
||||
}
|
||||
|
||||
.rtl #adminmenuback {
|
||||
left: auto;
|
||||
right: 0;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.rtl #adminmenuback,
|
||||
.rtl #adminmenuwrap {
|
||||
border-width: 0 0 0 1px;
|
||||
}
|
||||
|
||||
#plupload-upload-ui {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.post-com-count-wrapper a.post-com-count {
|
||||
float: none;
|
||||
}
|
||||
|
||||
#adminmenu .wp-submenu ul {
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
#adminmenu .wp-submenu .wp-submenu .wp-submenu,
|
||||
#adminmenu .wp-menu-open .wp-submenu .wp-submenu {
|
||||
border: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
.folded #adminmenu .wp-submenu {
|
||||
right: 30px;
|
||||
}
|
||||
|
||||
#wpcontent #adminmenu .wp-submenu li.wp-submenu-head {
|
||||
padding: 3px 10px 4px 4px;
|
||||
}
|
||||
|
||||
div.quicktags-toolbar input {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.inline-edit-row fieldset label span.title {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.inline-edit-row fieldset label span.input-text-wrap {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
p.search-box {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#bh {
|
||||
margin: 7px 10px 0 0;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.postbox div.inside,
|
||||
.wp-editor-wrap .wp-editor-container .wp-editor-area,
|
||||
#nav-menu-theme-locations .howto select {
|
||||
width: 97.5%;
|
||||
}
|
||||
|
||||
/* without this dashboard widgets appear in one column for some screen widths */
|
||||
div#dashboard-widgets {
|
||||
padding-right: 0;
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
.widefat th input {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
/* ---------- add by navid */
|
||||
#TB_window {
|
||||
width: 670px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-right: 335px !important;
|
||||
}
|
||||
|
||||
#dashboard_plugins {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
#dashboard_plugins h3.hndle {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
#dashboard_incoming_links ul li,
|
||||
#dashboard_secondary ul li,
|
||||
#dashboard_primary ul li,
|
||||
p.row-actions {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#post-status-info {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
p.submit { /* quick edit and reply in edit-comments.php */
|
||||
height:22px;
|
||||
}
|
||||
|
||||
.available-theme .action-links li {
|
||||
padding-left: 7px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
form#widgets-filter { /* fix widget page */
|
||||
position: static;
|
||||
}
|
||||
|
||||
/* nav menus
|
||||
.menu-max-depth-0 #menu-management { width: 460px; }
|
||||
.menu-max-depth-1 #menu-management { width: 490px; }
|
||||
.menu-max-depth-2 #menu-management { width: 520px; }
|
||||
.menu-max-depth-3 #menu-management { width: 550px; }
|
||||
.menu-max-depth-4 #menu-management { width: 580px; }
|
||||
.menu-max-depth-5 #menu-management { width: 610px; }
|
||||
.menu-max-depth-6 #menu-management { width: 640px; }
|
||||
.menu-max-depth-7 #menu-management { width: 670px; }
|
||||
.menu-max-depth-8 #menu-management { width: 700px; }
|
||||
.menu-max-depth-9 #menu-management { width: 730px; }
|
||||
.menu-max-depth-10 #menu-management { width: 760px; }
|
||||
.menu-max-depth-11 #menu-management { width: 790px; }
|
||||
*/
|
||||
.menu-item-depth-0 { margin-left: 0px; }
|
||||
.menu-item-depth-1 { margin-left: -30px; }
|
||||
.menu-item-depth-2 { margin-left: -60px; }
|
||||
.menu-item-depth-3 { margin-left: -90px; }
|
||||
.menu-item-depth-4 { margin-left: -120px; }
|
||||
.menu-item-depth-5 { margin-left: -150px; }
|
||||
.menu-item-depth-6 { margin-left: -180px; }
|
||||
.menu-item-depth-7 { margin-left: -210px; }
|
||||
.menu-item-depth-8 { margin-left: -240px; }
|
||||
.menu-item-depth-9 { margin-left: -270px; }
|
||||
.menu-item-depth-10 { margin-left: -300px; }
|
||||
.menu-item-depth-11 { margin-left: -330px; }
|
||||
|
||||
/*
|
||||
#menu-to-edit li dl {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.ui-sortable-helper .menu-item-transport {
|
||||
margin-top: 13px;
|
||||
}
|
||||
|
||||
.ui-sortable-helper .menu-item-transport .menu-item-transport {
|
||||
margin-top: 0;
|
||||
}
|
||||
*/
|
||||
|
||||
#menu-management,
|
||||
.nav-menus-php .menu-edit,
|
||||
#nav-menu-header .submitbox {
|
||||
zoom: 1;
|
||||
}
|
||||
|
||||
.nav-menus-php label {
|
||||
max-width: 90% !important;
|
||||
}
|
||||
|
||||
p.button-controls,
|
||||
.nav-menus-php .tabs-panel {
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
.nav-menus-php .major-publishing-actions .publishing-action {
|
||||
float: none;
|
||||
}
|
||||
|
||||
#wpbody #nav-menu-header label {
|
||||
float: none;
|
||||
}
|
||||
|
||||
#nav-menu-header {
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
#nav-menu-footer {
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
|
||||
#update-nav-menu .publishing-action {
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
#nav-menus-frame #update-nav-menu .delete-action {
|
||||
margin-top: -25px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#menu-to-edit li {
|
||||
margin-top: -10px;
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
|
||||
.sortable-placeholder {
|
||||
margin-top: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
margin-bottom: 13px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.auto-add-pages {
|
||||
clear: both;
|
||||
float: none;
|
||||
}
|
||||
|
||||
#nav-menus-frame .open-label span {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#nav-menus-frame .delete-action {
|
||||
float: none;
|
||||
}
|
||||
|
||||
#title-wrap #title-prompt-text {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.screen-reader-text {
|
||||
right: auto;
|
||||
text-indent: -1000em;
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
body#media-upload ul#sidemenu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
#search-filter {
|
||||
text-align: left;
|
||||
}
|
||||
/* specific to the image upload form */
|
||||
.align .field label {
|
||||
padding: 0 23px 0 0;
|
||||
margin: 0 3px 0 1em;
|
||||
}
|
||||
.image-align-none-label, .image-align-left-label, .image-align-center-label, .image-align-right-label {
|
||||
background-position: center right;
|
||||
}
|
||||
tr.image-size label {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
.file-error {
|
||||
margin: 0 50px 5px 0;
|
||||
}
|
||||
.progress {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.describe td {
|
||||
padding: 0 0 0 5px;
|
||||
}
|
||||
|
||||
/* Specific to Uploader */
|
||||
#media-upload .describe th.label {
|
||||
text-align: right;
|
||||
}
|
||||
.menu_order {
|
||||
float: left;
|
||||
}
|
||||
.media-upload-form label.form-help, td.help, #media-upload p.help, #media-upload label.help {
|
||||
font-family: Tahoma, Arial;
|
||||
}
|
||||
#gallery-settings #basic th.label {
|
||||
padding: 5px 0 5px 5px;
|
||||
}
|
||||
#gallery-settings .title, h3.media-title {
|
||||
font-family: Tahoma, Arial;
|
||||
}
|
||||
#gallery-settings .describe th.label {
|
||||
text-align: right;
|
||||
}
|
||||
#gallery-settings label,
|
||||
#gallery-settings legend {
|
||||
margin-right: 0;
|
||||
margin-left: 15px;
|
||||
}
|
||||
#gallery-settings .align .field label {
|
||||
margin: 0 3px 0 1em;
|
||||
}
|
||||
#sort-buttons {
|
||||
margin: 3px 0 -8px 25px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#sort-buttons #asc,
|
||||
#sort-buttons #showall {
|
||||
padding-left: 0;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#sort-buttons span {
|
||||
margin-right: 0;
|
||||
margin-left: 25px;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -3510,11 +3510,6 @@ ul.cat-checklist {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
|
||||
.rtl #lost-connection-notice .spinner {
|
||||
float: right;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
#titlediv {
|
||||
position: relative;
|
||||
margin-bottom: 10px;
|
||||
@ -8181,11 +8176,6 @@ body.interim-login {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.rtl #dashboard_right_now p.musub {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
#dashboard_right_now td.b a.musublink {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
@ -65,25 +65,27 @@ class WP_Styles extends WP_Dependencies {
|
||||
$rel = isset($obj->extra['alt']) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet';
|
||||
$title = isset($obj->extra['title']) ? "title='" . esc_attr( $obj->extra['title'] ) . "'" : '';
|
||||
|
||||
$end_cond = $tag = '';
|
||||
if ( isset($obj->extra['conditional']) && $obj->extra['conditional'] ) {
|
||||
$tag .= "<!--[if {$obj->extra['conditional']}]>\n";
|
||||
$end_cond = "<![endif]-->\n";
|
||||
}
|
||||
|
||||
$tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );
|
||||
$tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );
|
||||
if ( 'rtl' === $this->text_direction && isset($obj->extra['rtl']) && $obj->extra['rtl'] ) {
|
||||
if ( is_bool( $obj->extra['rtl'] ) ) {
|
||||
if ( is_bool( $obj->extra['rtl'] ) || 'replace' === $obj->extra['rtl'] ) {
|
||||
$suffix = isset( $obj->extra['suffix'] ) ? $obj->extra['suffix'] : '';
|
||||
$rtl_href = str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $this->_css_href( $obj->src , $ver, "$handle-rtl" ));
|
||||
} else {
|
||||
$rtl_href = $this->_css_href( $obj->extra['rtl'], $ver, "$handle-rtl" );
|
||||
}
|
||||
|
||||
$tag .= apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-rtl-css' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle );
|
||||
$rtl_tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-rtl-css' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle );
|
||||
|
||||
if ( $obj->extra['rtl'] === 'replace' ) {
|
||||
$tag = $rtl_tag;
|
||||
} else {
|
||||
$tag .= $rtl_tag;
|
||||
}
|
||||
}
|
||||
|
||||
$tag .= $end_cond;
|
||||
if ( isset($obj->extra['conditional']) && $obj->extra['conditional'] ) {
|
||||
$tag = "<!--[if {$obj->extra['conditional']}]>\n" . $tag . "<![endif]-->\n";
|
||||
}
|
||||
|
||||
if ( $this->do_concat ) {
|
||||
$this->print_html .= $tag;
|
||||
|
@ -1,190 +0,0 @@
|
||||
#wpadminbar * {
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#wpadminbar {
|
||||
direction: rtl;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks ul {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#wpadminbar li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .ab-top-secondary > li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .ab-top-secondary > li > a,
|
||||
#wpadminbar .quicklinks .ab-top-secondary > li > .ab-empty-item {
|
||||
}
|
||||
|
||||
#wpadminbar.ie7 .menupop .ab-sub-wrapper,
|
||||
#wpadminbar.ie7 .shortlink-input {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-secondary .menupop .ab-sub-wrapper {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop li:hover > .ab-sub-wrapper,
|
||||
#wpadminbar .menupop li.hover > .ab-sub-wrapper {
|
||||
margin-left: 0px;
|
||||
margin-right: 100%;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-secondary .menupop li:hover > .ab-sub-wrapper,
|
||||
#wpadminbar .ab-top-secondary .menupop li.hover > .ab-sub-wrapper {
|
||||
margin-left: inherit;
|
||||
margin-right: 0;
|
||||
left: 100%;
|
||||
right: inherit;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop .menupop > .ab-item {
|
||||
padding-left: 2em;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop .menupop > .ab-item:before {
|
||||
content: '\f141';
|
||||
right: auto;
|
||||
left: 3px;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item {
|
||||
padding-left: 1em;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before {
|
||||
content: '\f139';
|
||||
left: auto;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-secondary {
|
||||
float: left;
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#wpadminbar ul li:last-child,
|
||||
#wpadminbar ul li:last-child .ab-item {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
#wpadminbar .screen-reader-shortcut:focus {
|
||||
left: auto;
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
/**
|
||||
* My Account
|
||||
*/
|
||||
#wpadminbar #wp-admin-bar-my-account.with-avatar #wp-admin-bar-user-actions > li {
|
||||
margin-right: 88px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
#wp-admin-bar-user-actions > li > .ab-item {
|
||||
padding-left: 0;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#wp-admin-bar-user-info .avatar {
|
||||
left: auto;
|
||||
right: -72px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
|
||||
margin-left: -1px;
|
||||
margin-right: 4px
|
||||
}
|
||||
|
||||
/*
|
||||
* My Sites
|
||||
*/
|
||||
#wpadminbar .quicklinks li .blavatar {
|
||||
float: right;
|
||||
margin-right: -10px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Search
|
||||
*/
|
||||
#wpadminbar #adminbarsearch:before {
|
||||
left: auto;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
#wpadminbar #adminbarsearch .adminbar-input {
|
||||
padding: 0 24px 0 3px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comments icon
|
||||
*/
|
||||
#wpadminbar .ab-icon {
|
||||
float: right;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.ie7 #wp-admin-bar-wp-logo > .ab-item .ab-icon {
|
||||
position: static;
|
||||
}
|
||||
|
||||
#wpadminbar.ie7 .ab-icon {
|
||||
float: left;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-label {
|
||||
margin-left: 0px;
|
||||
margin-right: 4px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#wpadminbar.ie7 .ab-label {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#wpadminbar.ie7 #wp-admin-bar-comments > a {
|
||||
min-width: 25px;
|
||||
}
|
||||
|
||||
#wpadminbar a:hover .ab-comments-icon-arrow {
|
||||
border-right-color: #bbb;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop .ab-sub-wrapper,
|
||||
#wpadminbar .shortlink-input {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks .menupop ul li a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/**
|
||||
* IE 6-targeted rules
|
||||
*/
|
||||
* html #wpadminbar .quicklinks ul li a {
|
||||
float: right;
|
||||
}
|
@ -1,312 +0,0 @@
|
||||
/**
|
||||
* Modal
|
||||
*/
|
||||
.media-modal-close {
|
||||
right: auto;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Toolbar
|
||||
*/
|
||||
.media-toolbar-primary {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.media-toolbar-secondary {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.media-toolbar-primary > .media-button,
|
||||
.media-toolbar-primary > .media-button-group {
|
||||
margin-left: 0;
|
||||
margin-right: 10px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.media-toolbar-secondary > .media-button,
|
||||
.media-toolbar-secondary > .media-button-group {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sidebar
|
||||
*/
|
||||
.media-sidebar {
|
||||
right: auto;
|
||||
left: 0;
|
||||
border-left: 0;
|
||||
border-right: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
.media-sidebar .setting {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.media-sidebar .setting .link-to-custom {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.media-sidebar .setting span {
|
||||
margin-right: 0;
|
||||
margin-left: 4%;
|
||||
}
|
||||
|
||||
.media-sidebar .setting span,
|
||||
.compat-item label span {
|
||||
float: right;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.media-sidebar .setting input,
|
||||
.media-sidebar .setting textarea {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.compat-item {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.compat-item .label {
|
||||
margin-right: 0;
|
||||
margin-left: 4%;
|
||||
float: right;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.compat-item .field {
|
||||
float: left;
|
||||
padding-right: 0;
|
||||
padding-left: 1px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Menu
|
||||
*/
|
||||
.media-menu {
|
||||
border-right: 0;
|
||||
border-left: 1px solid #d9d9d9;
|
||||
box-shadow: inset 6px 0 6px -6px rgba( 0, 0, 0, 0.2 )
|
||||
}
|
||||
|
||||
/**
|
||||
* Router
|
||||
*/
|
||||
.media-router > a {
|
||||
float: right;
|
||||
border-right: 0;
|
||||
border-left: 1px solid #dfdfdf;
|
||||
}
|
||||
.media-router > a:last-child {
|
||||
border-left: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Frame
|
||||
*/
|
||||
.media-frame-menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.media-frame-title,
|
||||
.media-frame-router,
|
||||
.media-frame-content,
|
||||
.media-frame-toolbar {
|
||||
left: 0;
|
||||
right: 200px;
|
||||
}
|
||||
|
||||
.media-frame.hide-menu .media-frame-title,
|
||||
.media-frame.hide-menu .media-frame-router,
|
||||
.media-frame.hide-menu .media-frame-toolbar,
|
||||
.media-frame.hide-menu .media-frame-content {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.media-frame.hide-menu .media-frame-menu {
|
||||
left: auto;
|
||||
right: -200px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment Browser Filters
|
||||
*/
|
||||
.media-frame select.attachment-filters {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search
|
||||
*/
|
||||
.media-toolbar-secondary .search {
|
||||
margin-right: 0;
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachments
|
||||
*/
|
||||
.attachments {
|
||||
padding-right: 0;
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment
|
||||
*/
|
||||
.attachment {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.attachment .thumbnail {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.attachment .close {
|
||||
right: auto;
|
||||
left: 5px;
|
||||
}
|
||||
|
||||
.attachment .check {
|
||||
right: auto;
|
||||
left: -7px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachments Browser
|
||||
*/
|
||||
.attachments-browser .media-toolbar {
|
||||
right: 0;
|
||||
left: 300px;
|
||||
}
|
||||
|
||||
.attachments-browser .attachments,
|
||||
.attachments-browser .uploader-inline {
|
||||
right: 0;
|
||||
left: 300px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Progress Bar
|
||||
*/
|
||||
.attachment-preview .media-progress-bar {
|
||||
left: auto;
|
||||
right: 15%;
|
||||
}
|
||||
|
||||
.media-sidebar .media-uploader-status .upload-dismiss-errors {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.upload-errors .upload-error-label {
|
||||
margin-right: 0;
|
||||
margin-left: 8px;
|
||||
float: right;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Selection
|
||||
*/
|
||||
.media-selection {
|
||||
right: 0;
|
||||
left: 350px;
|
||||
padding: 0 16px 0 0;
|
||||
}
|
||||
|
||||
.media-selection .selection-info {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.media-selection .selection-info a {
|
||||
float: right;
|
||||
border-right: 0;
|
||||
border-left: 1px solid #dfdfdf;
|
||||
margin: 1px -8px 1px 8px;
|
||||
}
|
||||
|
||||
.media-selection .selection-info a:last-child {
|
||||
border-right: 1px;
|
||||
border-left: 0;
|
||||
margin-left: 0;
|
||||
margin-right: -8px;
|
||||
}
|
||||
|
||||
.media-selection:after {
|
||||
right: auto;
|
||||
left: 0;
|
||||
background-image: -webkit-gradient(linear, left top, right top, from( rgba( 255, 255, 255, 1 ) ), to( rgba( 255, 255, 255, 0 ) ));
|
||||
background-image: -webkit-linear-gradient(left, rgba( 255, 255, 255, 1 ) , rgba( 255, 255, 255, 0 ) );
|
||||
background-image: -moz-linear-gradient(left, rgba( 255, 255, 255, 1 ) , rgba( 255, 255, 255, 0 ) );
|
||||
background-image: -o-linear-gradient(left, rgba( 255, 255, 255, 1 ) , rgba( 255, 255, 255, 0 ) );
|
||||
background-image: linear-gradient(to right, rgba( 255, 255, 255, 1 ) , rgba( 255, 255, 255, 0 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment Details
|
||||
*/
|
||||
.attachment-info .thumbnail {
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.attachment-info .details {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment Display Settings
|
||||
*/
|
||||
.attachment-display-settings {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/**
|
||||
* Embed from URL
|
||||
*/
|
||||
.embed-url span {
|
||||
display: block;
|
||||
padding: 4px 2px 6px 0;
|
||||
}
|
||||
|
||||
.media-embed .thumbnail {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.media-embed .setting {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.media-frame .embed-url input,
|
||||
.media-frame .link-to-custom {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Responsive layout
|
||||
*/
|
||||
@media only screen and (max-width: 900px) {
|
||||
.media-frame-title,
|
||||
.media-frame-router,
|
||||
.media-frame-content,
|
||||
.media-frame-toolbar {
|
||||
left: 0;
|
||||
right: 140px;
|
||||
}
|
||||
|
||||
.attachments-browser .attachments,
|
||||
.attachments-browser .uploader-inline,
|
||||
.attachments-browser .media-toolbar {
|
||||
right: 0;
|
||||
left: 180px;
|
||||
}
|
||||
}
|
@ -183,6 +183,15 @@ class WP_Locale {
|
||||
/* translators: 'rtl' or 'ltr'. This sets the text direction for WordPress. */
|
||||
elseif ( 'rtl' == _x( 'ltr', 'text direction' ) )
|
||||
$this->text_direction = 'rtl';
|
||||
|
||||
if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {
|
||||
$this->text_direction = 'ltr';
|
||||
add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) );
|
||||
}
|
||||
}
|
||||
|
||||
function rtl_src_admin_notice() {
|
||||
echo '<div class="error"><p>' . 'The <code>build</code> directory of the develop repository must be used for RTL.' . '</p></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -552,8 +552,6 @@ function wp_default_styles( &$styles ) {
|
||||
$suffix = SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
$rtl_styles = array( 'wp-admin', 'ie', 'media', 'admin-bar', 'customize-controls', 'media-views', 'wp-color-picker' );
|
||||
// Any rtl stylesheets that don't have a .min version
|
||||
$no_suffix = array( 'farbtastic' );
|
||||
|
||||
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array( 'open-sans', 'dashicons' ) );
|
||||
|
||||
@ -592,9 +590,7 @@ function wp_default_styles( &$styles ) {
|
||||
$styles->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement.css", array( 'mediaelement' ) );
|
||||
|
||||
foreach ( $rtl_styles as $rtl_style ) {
|
||||
$styles->add_data( $rtl_style, 'rtl', true );
|
||||
if ( $suffix && ! in_array( $rtl_style, $no_suffix ) )
|
||||
$styles->add_data( $rtl_style, 'suffix', $suffix );
|
||||
$styles->add_data( $rtl_style, 'rtl', 'replace' );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user