From d62abf57d6d0addeaf0a1a5cd6b400c706b51d0c Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 28 Sep 2012 00:33:40 +0000 Subject: [PATCH] Fix "add media" icon in DFW for IE < 9, restore media-button.png, add media-button-2x.png and make them background images, see #21019 git-svn-id: http://core.svn.wordpress.org/trunk@22077 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/images/media-button-2x.png | Bin 0 -> 924 bytes wp-admin/images/media-button.png | Bin 924 -> 330 bytes wp-admin/includes/media.php | 4 +- wp-includes/css/editor.css | 109 ++++++++++++++++------------ 4 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 wp-admin/images/media-button-2x.png diff --git a/wp-admin/images/media-button-2x.png b/wp-admin/images/media-button-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..b7d9b48e235d12cf087e1f6b80c1daca6727d965 GIT binary patch literal 924 zcmV;N17rM&P)V=N@!RXqUm;HbCZ%0p zU(3$Uj(q<9R)Ak^ZEf-$B6dN5>gwv$)zy`}zP`%K%ZonW-rnT>{ay9(@gcXjx4v|L zf3MjCqL>WmADH;@@lo#X?j)T~OEQ_1v$He(902(d;KVE%0P2T_2f4Yq5wdY{aUrLt zr*e3Bs2RZKM^8^r8q*g5y1cy9w>~*Jk%NN++1uMw05W2X={8TEX@fgnmAmzOA`ue&~ys)q!b8~aLILQVR@V0>U_4P?dM~8|&W7yi;+tn8c z1F*KXmZiJ^Ogb?!p>H)dHYTH^qcSowBG1pyGBq_NwY9aH^2NnPiAJN+)6=7(4=fEI ze3{4qI1^=wc%cBu(#*_^OioU!=x=Urs;#D`CI`S;cv>Za0GgVbG%!^{b-2YCw&v#M z8~{Ft5df~t_yZUi7|?Y7?pD}F4&kbN_i!u!i zU@}2~y1F_Qea75AZU9QqEwUC0pcwt@6R^eS0GQKjX=zF3=jU}pArL_919mMJ5}TRV zVdM!Ai9~c8{_5kH()6kVcEl_IXJ1a%*VkuV!@feqB(|Law&^SYXD=^vlweN}qVn=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^vlweN}qVn=` zT{k=}8!^jl08U(c4TQSancC)AtZxRuAyoOCu+-6SN5`MiJAfAezV2h#_+|hCyzP(5 z%F5Kx(2yR%i1OtoWdq>LL|(pO0D7IKHy*bLZUe9o^ZAAWNVCA~J0N!eFMxc$p#WA_ zSGCT$cq00YIkrDGKtA6v08ws0>~wB%DZyp~1S`A%0000'; + $img = ''; - echo '' . $img . ' Beta Media'; + echo '' . $img . ' Beta Media'; echo '' . sprintf( $context, $img ) . ''; } diff --git a/wp-includes/css/editor.css b/wp-includes/css/editor.css index a00cdee8b8..570a8702e5 100644 --- a/wp-includes/css/editor.css +++ b/wp-includes/css/editor.css @@ -392,47 +392,6 @@ background-image: url('../images/wpicons.png?ver=20120720'); } -@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { - .wp_themeSkin span.mce_undo, - .wp_themeSkin span.mce_redo, - .wp_themeSkin span.mce_bullist, - .wp_themeSkin span.mce_numlist, - .wp_themeSkin span.mce_blockquote, - .wp_themeSkin span.mce_charmap, - .wp_themeSkin span.mce_bold, - .wp_themeSkin span.mce_italic, - .wp_themeSkin span.mce_underline, - .wp_themeSkin span.mce_justifyleft, - .wp_themeSkin span.mce_justifyright, - .wp_themeSkin span.mce_justifycenter, - .wp_themeSkin span.mce_justifyfull, - .wp_themeSkin span.mce_indent, - .wp_themeSkin span.mce_outdent, - .wp_themeSkin span.mce_link, - .wp_themeSkin span.mce_unlink, - .wp_themeSkin span.mce_help, - .wp_themeSkin span.mce_removeformat, - .wp_themeSkin span.mce_fullscreen, - .wp_themeSkin span.mce_wp_fullscreen, - .wp_themeSkin span.mce_media, - .wp_themeSkin span.mce_pastetext, - .wp_themeSkin span.mce_pasteword, - .wp_themeSkin span.mce_wp_help, - .wp_themeSkin span.mce_wp_adv, - .wp_themeSkin span.mce_wp_more, - .wp_themeSkin span.mce_strikethrough, - .wp_themeSkin span.mce_spellchecker, - .wp_themeSkin span.mce_forecolor, - .wp_themeSkin .mce_forecolorpicker, - .wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker, - .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor, - .wp_themeSkin .mceSplitButton span.mce_numlist, - .wp_themeSkin .mceSplitButton span.mce_bullist { - background-image: url('../images/wpicons-2x.png?ver=20120720'); - background-size: 560px 40px; - } -} - /* ColorSplitButton */ .wp_themeSkin div.mceColorSplitMenu table { background-color: #ebebeb; @@ -1098,6 +1057,18 @@ html[dir="rtl"] .wp-switch-editor { vertical-align: middle; } +.wp-media-buttons span.wp-media-buttons-icon { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: text-top; + margin: 0 2px; +} + +.wp-media-buttons .add_media span.wp-media-buttons-icon { + background: url('../../wp-admin/images/media-button.png') no-repeat top left; +} + .quicktags-toolbar { border-bottom-style: solid; border-bottom-width: 1px; @@ -1868,10 +1839,9 @@ RTL display: none; } -#wp-fullscreen-buttons .mce_image .mce_image { - background-image: url('../../wp-admin/images/media-button.png?ver=20120201'); - background-position: top left; - background-size: 100%; +#wp-fullscreen-buttons #wp_fs_image span.mce_image { + background-image: url('../../wp-admin/images/media-button.png'); + background-position: 2px 2px; } /* =Thickbox Adjustments @@ -2049,3 +2019,52 @@ RTL -------------------------------------------------------------- */ /* No RTL for now, this space intentionally left blank */ + +/* HiDPI */ +@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { + .wp_themeSkin span.mce_undo, + .wp_themeSkin span.mce_redo, + .wp_themeSkin span.mce_bullist, + .wp_themeSkin span.mce_numlist, + .wp_themeSkin span.mce_blockquote, + .wp_themeSkin span.mce_charmap, + .wp_themeSkin span.mce_bold, + .wp_themeSkin span.mce_italic, + .wp_themeSkin span.mce_underline, + .wp_themeSkin span.mce_justifyleft, + .wp_themeSkin span.mce_justifyright, + .wp_themeSkin span.mce_justifycenter, + .wp_themeSkin span.mce_justifyfull, + .wp_themeSkin span.mce_indent, + .wp_themeSkin span.mce_outdent, + .wp_themeSkin span.mce_link, + .wp_themeSkin span.mce_unlink, + .wp_themeSkin span.mce_help, + .wp_themeSkin span.mce_removeformat, + .wp_themeSkin span.mce_fullscreen, + .wp_themeSkin span.mce_wp_fullscreen, + .wp_themeSkin span.mce_media, + .wp_themeSkin span.mce_pastetext, + .wp_themeSkin span.mce_pasteword, + .wp_themeSkin span.mce_wp_help, + .wp_themeSkin span.mce_wp_adv, + .wp_themeSkin span.mce_wp_more, + .wp_themeSkin span.mce_strikethrough, + .wp_themeSkin span.mce_spellchecker, + .wp_themeSkin span.mce_forecolor, + .wp_themeSkin .mce_forecolorpicker, + .wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker, + .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor, + .wp_themeSkin .mceSplitButton span.mce_numlist, + .wp_themeSkin .mceSplitButton span.mce_bullist { + background-image: url('../images/wpicons-2x.png?ver=20120720'); + background-size: 560px 40px; + } + + .wp-media-buttons .add_media span.wp-media-buttons-icon, + #wp-fullscreen-buttons #wp_fs_image span.mce_image { + background-image: url('../../wp-admin/images/media-button-2x.png'); + background-size: 16px 16px; + } +} +