WordPress.org

Make WordPress Core

Changeset 31806


Ignore:
Timestamp:
03/18/2015 01:57:18 AM (7 years ago)
Author:
azaozz
Message:

Press This: fix styling on the Tools screen.
Props Michael-Arestad, see #31462.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/forms.css

    r31755 r31806  
    675675}
    676676
    677 .pressthis {
    678     margin: 20px 0;
     677/* Card styles */
     678
     679.card {
     680    position: relative;
     681    margin-top: 20px;
     682    padding: 0.7em 2em 1em;
     683    min-width: 255px;
     684    max-width: 520px;
     685    border: 1px solid #e5e5e5;
     686    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
     687    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
     688    background: #fff;
     689}
     690
     691/* Press this styles */
     692
     693.pressthis h4 {
     694    margin: 2em 0 1em;
     695}
     696
     697.pressthis textarea {
     698    width: 100%;
     699    font-size: 1em;
     700}
     701
     702#pressthis-code-wrap {
     703    overflow: auto;
     704}
     705
     706.pressthis-bookmarklet-wrapper {
     707    margin: 20px 0 8px;
    679708    vertical-align: top;
    680709    position: relative;
     
    682711}
    683712
    684 .pressthis a,
    685 .pressthis a:hover,
    686 .pressthis a:focus,
    687 .pressthis a:active {
     713.pressthis-bookmarklet,
     714.pressthis-bookmarklet:hover,
     715.pressthis-bookmarklet:focus,
     716.pressthis-bookmarklet:active {
    688717    display: inline-block;
    689718    position: relative;
     
    700729}
    701730
    702 .pressthis a:active {
     731.pressthis-bookmarklet:active {
    703732    outline: none;
    704733}
    705734
    706 .pressthis a:hover:after {
    707     -webkit-transform: skew(20deg) rotate(9deg);
    708     -ms-transform: skew(20deg) rotate(9deg);
    709     transform: skew(20deg) rotate(9deg);
    710     -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
    711     box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
    712 }
    713 
    714 .pressthis a span {
    715     display: inline-block;
    716     margin: 0px 0 0;
    717     padding: 0px 12px 8px 9px;
    718 }
    719 
    720 .pressthis a span:before {
    721     color: #777;
    722     font: normal 20px/1 'dashicons';
    723     content:'\f157';
    724     position: relative;
    725     display: inline-block;
    726     top: 4px;
    727     margin-right: 4px;
    728 }
    729 
    730 .pressthis a:after {
     735.pressthis-bookmarklet:after {
    731736    content: '';
    732737    width: 70%;
     
    744749}
    745750
    746 .pressthis .button {
     751.pressthis-bookmarklet:hover:after {
     752    -webkit-transform: skew(20deg) rotate(9deg);
     753    -ms-transform: skew(20deg) rotate(9deg);
     754    transform: skew(20deg) rotate(9deg);
     755    -webkit-box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
     756    box-shadow: 0 10px 8px rgba(0, 0, 0, 0.7);
     757}
     758
     759.pressthis-bookmarklet span {
     760    display: inline-block;
     761    margin: 0px 0 0;
     762    padding: 0px 12px 8px 9px;
     763}
     764
     765.pressthis-bookmarklet span:before {
     766    color: #777;
     767    font: normal 20px/1 'dashicons';
     768    content:'\f157';
     769    position: relative;
     770    display: inline-block;
     771    top: 4px;
     772    margin-right: 4px;
     773}
     774
     775.pressthis-js-toggle {
    747776    margin-left: 10px;
    748777    padding: 0;
     
    751780}
    752781
    753 .pressthis button .dashicons {
     782.pressthis-js-toggle .dashicons {
    754783    margin: 5px 8px 6px 7px;
    755784    color: #777;
    756785}
    757786
    758 .press-this-install {
    759     margin: 20px 0 0 0;
    760     padding: 0.7em 2em 1em;
    761     max-width: 520px;
    762 }
    763 
    764 .press-this-install textarea {
    765     width: 100%;
    766     font-size: 1em;
    767 }
    768 
    769 .press-this-install h4 {
    770     margin: 2em 0 1em;
    771 }
    772 
    773787/* to override the button class being applied */
    774 .pressthis .button.button {
     788.pressthis-js-toggle.button.button {
    775789    margin-left: 10px;
    776790    padding: 0;
     
    779793}
    780794
    781 .pressthis button .dashicons {
     795.pressthis-js-toggle .dashicons {
    782796    margin: 5px 8px 6px 7px;
    783797    color: #777;
    784798}
    785 
    786 .press-this-install {
    787     margin: 20px 0 0 0;
    788     padding: 0.7em 2em 1em;
    789     max-width: 520px;
    790 }
    791 
    792 .press-this-install textarea {
    793     width: 100%;
    794     font-size: 1em;
    795 }
    796 
    797 .press-this-install h4 {
    798     margin: 2em 0 1em;
    799 }
    800 
    801799
    802800/*------------------------------------------------------------------------------
  • trunk/src/wp-admin/tools.php

    r31768 r31806  
    3737
    3838<?php if ( current_user_can('edit_posts') ) : ?>
    39 <div class="tool-box">
    40     <h3 class="title"><?php _e('Press This') ?></h3>
    41     <div class="postbox press-this-install">
    42         <p><?php _e( 'Press This is a little app that lets you grab bits of the web and create new posts with ease.' );?></p>
    43         <p><?php _e( 'Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.' ); ?></p>
    44     </div>
     39<div class="card pressthis">
     40    <h3><?php _e('Press This') ?></h3>
     41    <p><?php _e( 'Press This is a little app that lets you grab bits of the web and create new posts with ease.' );?></p>
     42    <p><?php _e( 'Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your site.' ); ?></p>
     43
    4544
    4645    <form>
    47     <div class="postbox press-this-install">
    4846        <h3><?php _e( 'Install Press This' ); ?></h3>
    4947        <h4><?php _e( 'Bookmarklet' ); ?></h4>
    5048        <p><?php _e( 'Drag the bookmarklet below to your bookmarks bar. Then, when you&#8217;re on a page you want to share, simply &#8220;press&#8221; it.' ); ?></p>
    5149
    52         <p class="pressthis">
    53             <a class="" onclick="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ) ?></span></a>
    54             <button type="button" class="button button-secondary js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap">
     50        <p class="pressthis-bookmarklet-wrapper">
     51            <a class="pressthis-bookmarklet" onclick="return false;" href="<?php echo htmlspecialchars( get_shortcut_link() ); ?>"><span><?php _e( 'Press This' ); ?></span></a>
     52            <button type="button" class="button button-secondary pressthis-js-toggle js-show-pressthis-code-wrap" aria-expanded="false" aria-controls="pressthis-code-wrap">
    5553                <span class="dashicons dashicons-clipboard"></span>
    5654                <span class="screen-reader-text"><?php _e( 'Copy &#8220;Press This&#8221; bookmarklet code' ) ?></span>
     
    5856        </p>
    5957
    60         <div class="hidden js-pressthis-code-wrap" id="pressthis-code-wrap">
     58        <div class="hidden js-pressthis-code-wrap clear" id="pressthis-code-wrap">
    6159            <p id="pressthis-code-desc">
    6260                <?php _e( 'If you can&#8217;t drag the bookmarklet to your bookmarks, copy the following code and create a new bookmark. Paste the code into the new bookmark&#8217;s URL field.' ) ?>
     
    9391            });
    9492        </script>
    95     </div>
    9693    </form>
    9794</div>
     
    103100$tags = get_taxonomy('post_tag');
    104101if ( current_user_can($cats->cap->manage_terms) || current_user_can($tags->cap->manage_terms) ) : ?>
    105 <div class="tool-box">
     102<div class="card">
    106103    <h3 class="title"><?php _e( 'Categories and Tags Converter' ) ?></h3>
    107104    <p><?php printf( __('If you want to convert your categories to tags (or vice versa), use the <a href="%s">Categories and Tags Converter</a> available from the Import screen.'), 'import.php' ); ?></p>
Note: See TracChangeset for help on using the changeset viewer.