From c43b8b063d903b4ddcbed0eb6263d8eeb0070090 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 13 Apr 2014 23:59:01 +0000 Subject: [PATCH] Fix feature pointer RTL placement. props SergeyBiryukov, ocean90. fixes #27778. git-svn-id: https://develop.svn.wordpress.org/trunk@28107 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/template.php | 6 +++--- src/wp-includes/css/wp-pointer.css | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 49d5a5daf0..fb5814483c 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -1978,13 +1978,13 @@ final class WP_Internal_Pointers { if ( 'themes' === get_current_screen()->id ) { $selector = '.theme.active .customize'; - $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' ); + $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center', 'my' => is_rtl() ? 'right-13px' : '' ); } else { $selector = 'a[href="customize.php"]'; if ( is_rtl() ) { - $position = array( 'edge' => 'right', 'align' => 'center-8px', 'my' => 'right-5px' ); + $position = array( 'edge' => 'right', 'align' => 'center', 'my' => 'right-5px' ); } else { - $position = array( 'edge' => 'left', 'align' => 'center-8px', 'my' => 'left-5px' ); + $position = array( 'edge' => 'left', 'align' => 'center', 'my' => 'left-5px' ); } } diff --git a/src/wp-includes/css/wp-pointer.css b/src/wp-includes/css/wp-pointer.css index 77dc60ee80..dbf09b6a44 100644 --- a/src/wp-includes/css/wp-pointer.css +++ b/src/wp-includes/css/wp-pointer.css @@ -66,7 +66,7 @@ display: block !important; font: normal 13px/1 'dashicons'; speak: none; - margin: 2px 0; + margin: 1px 0; text-align: center; -webkit-font-smoothing: antialiased !important; width: 10px; @@ -188,7 +188,7 @@ } .wp-pointer-right .wp-pointer-arrow:before { - margin-left: -14px; + margin-left: -12px; margin-top: -13px; border: 13px solid transparent; border-left-color: #fff; @@ -196,6 +196,12 @@ content: ' '; } +.rtl .wp-pointer-arrow:before { + -webkit-transform: rotateY(180deg); + -ms-transform: rotateY(180deg); + transform: rotateY(180deg); +} + /* Disable pointers at responsive sizes */ @media screen and ( max-width: 782px ) { .wp-pointer {