From 107001213bdf6480a49a28a570389223874bfbcb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 29 Jun 2014 16:05:53 +0000 Subject: [PATCH] Fix feature pointer positioning issues for both LTR and RTL. fixes #28062. git-svn-id: https://develop.svn.wordpress.org/trunk@28897 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/template.php | 4 ++-- src/wp-includes/css/wp-pointer.css | 34 ++++++++++++++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 95a3bf950d..b2a15d0d2c 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -1992,7 +1992,7 @@ final class WP_Internal_Pointers { self::print_js( 'wp360_revisions', '.misc-pub-section.misc-pub-revisions', array( 'content' => $content, - 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center', 'my' => is_rtl() ? 'left' : 'right-14px' ), + 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center' ), ) ); } @@ -2020,7 +2020,7 @@ final class WP_Internal_Pointers { if ( 'themes' === get_current_screen()->id ) { $selector = '.theme.active .customize'; - $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center', 'my' => is_rtl() ? 'right-13px' : '' ); + $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' ); } else { $selector = 'a[href="customize.php"]'; if ( is_rtl() ) { diff --git a/src/wp-includes/css/wp-pointer.css b/src/wp-includes/css/wp-pointer.css index 3aa0c8e030..1d69823f11 100644 --- a/src/wp-includes/css/wp-pointer.css +++ b/src/wp-includes/css/wp-pointer.css @@ -106,6 +106,7 @@ } .wp-pointer-bottom { + margin-top: -13px; padding-bottom: 13px; } @@ -115,6 +116,7 @@ } /* @noflip */ .wp-pointer-right { + margin-left: -13px; padding-right: 13px; } @@ -139,10 +141,11 @@ border-bottom-color: #3592b6; } -.wp-pointer-top .wp-pointer-arrow:before, -.wp-pointer-undefined .wp-pointer-arrow:before { +.wp-pointer-top .wp-pointer-arrow-inner, +.wp-pointer-undefined .wp-pointer-arrow-inner { + top: 1px; margin-left: -13px; - margin-top: -11px; + margin-top: -13px; border: 13px solid transparent; border-bottom-color: #2ea2cc; display: block; @@ -155,9 +158,10 @@ border-top-color: #ccc; } -.wp-pointer-bottom .wp-pointer-arrow:before { +.wp-pointer-bottom .wp-pointer-arrow-inner { + bottom: 1px; margin-left: -13px; - margin-top: -14px; + margin-bottom: -13px; border: 13px solid transparent; border-top-color: #fff; display: block; @@ -171,8 +175,10 @@ border-right-color: #ccc; } -.wp-pointer-left .wp-pointer-arrow:before { - margin-left: -14px; +/* @noflip */ +.wp-pointer-left .wp-pointer-arrow-inner { + left: 1px; + margin-left: -13px; margin-top: -13px; border: 13px solid transparent; border-right-color: #fff; @@ -182,13 +188,15 @@ /* @noflip */ .wp-pointer-right .wp-pointer-arrow { - right:0; + right: 0; border-width: 13px 0 13px 13px; border-left-color: #ccc; } -.wp-pointer-right .wp-pointer-arrow:before { - margin-left: -14px; +/* @noflip */ +.wp-pointer-right .wp-pointer-arrow-inner { + right: 1px; + margin-right: -13px; margin-top: -13px; border: 13px solid transparent; border-left-color: #fff; @@ -196,12 +204,6 @@ 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 {