Make WordPress Core

Ticket #26905: 26905-admin.patch

File 26905-admin.patch, 10.3 KB (added by morganestes, 11 years ago)

Mostly style, but some minor refactoring as well.

  • wp-admin/css/colors/_admin.scss

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    1 
    21@import 'variables';
    32@import 'mixins';
    43
     4/**
     5 * Table of Contents
     6 *
     7 * 0.0 Base
     8 * 1.0 Links
     9 * 2.0 Forms
     10 * 3.0 Core UI
     11 * 4.0 List tables
     12 * 5.0 Admin Menu
     13 *      5.1 Submenu
     14 *      5.2 Current
     15 *      5.3 Bubble
     16 *      5.4 Collapse button
     17 * 6.0 Admin Bar
     18 *      6.1 Submenu
     19 *      6.2 Search
     20 *      6.3 My Account
     21 * 7.0 Pointers
     22 * 8.0 Media Uploader
     23 * 9.0 Themes
     24 * 10.0 jQuery UI Slider
     25 * 11.0 Thickbox: Plugin information
     26 * 12.0 Responsive Component
     27 * 13.0 Miscellaneous
     28 */
    529
     30/**
     31 * 0.0 Base
     32 */
     33
    634html {
    735        background: $body-background;
    836}
    937
     38/**
     39 * 1.0 Links
     40 */
    1041
    11 /* Links */
    12 
    1342a {
    1443        color: $link;
    1544
     
    2958        color: $link-focus;
    3059}
    3160
     61/**
     62 * 2.0 Forms
     63 */
    3264
    33 /* Forms */
    34 
    35 input[type=checkbox]:checked:before {
    36     color: $form-checked;
     65input[type="checkbox"]:checked:before {
     66        color: $form-checked;
    3767}
    3868
    39 input[type=radio]:checked:before {
    40     background: $form-checked;
     69input[type="radio"]:checked:before {
     70        background: $form-checked;
    4171}
    4272
    43 .wp-core-ui input[type="reset"]:hover,
    44 .wp-core-ui input[type="reset"]:active {
    45         color: $link-focus;
    46 }
     73.wp-core-ui input[type="reset"] {
     74        &:hover,
     75        &:active {
     76                color: $link-focus;
     77        }
     78}
    4779
     80/**
     81 * 3.0 Core UI
     82 */
    4883
    49 /* Core UI */
    50 
    5184.wp-core-ui {
    5285        .button-primary {
    53                 @include button( $button-color );
     86                @include button($button-color);
    5487        }
    5588
    5689        .wp-ui-primary {
    57                 color: $text-color;
    5890                background-color: $base-color;
     91                color: $text-color;
    5992        }
     93
    6094        .wp-ui-text-primary {
    6195                color: $base-color;
    6296        }
    6397
    6498        .wp-ui-highlight {
    65                 color: $menu-highlight-text;
    6699                background-color: $menu-highlight-background;
     100                color: $menu-highlight-text;
    67101        }
     102
    68103        .wp-ui-text-highlight {
    69104                color: $menu-highlight-background;
    70105        }
    71106
    72107        .wp-ui-notification {
    73                 color: $menu-bubble-text;
    74108                background-color: $menu-bubble-background;
     109                color: $menu-bubble-text;
    75110        }
     111
    76112        .wp-ui-text-notification {
    77113                color: $menu-bubble-background;
    78114        }
     
    82118        }
    83119}
    84120
     121/**
     122 * 4.0 List tables
     123 */
    85124
    86 /* List tables */
    87 
    88125.wrap .add-new-h2:hover,
    89126#add-new-comment a:hover,
    90127.tablenav .tablenav-pages a:hover,
    91128.tablenav .tablenav-pages a:focus {
    92         color: $menu-text;
    93129        background-color: $menu-background;
     130        color: $menu-text;
    94131}
    95132
    96133.view-switch a.current:before {
     
    104141.post-com-count:hover:after {
    105142        border-top-color: $menu-background;
    106143}
     144
    107145.post-com-count:hover span {
    108         color: $menu-text;
    109146        background-color: $menu-background;
     147        color: $menu-text;
    110148}
    111149
    112150strong .post-com-count:after {
    113151        border-top-color: $menu-bubble-background;
    114152}
     153
    115154strong .post-com-count span {
    116155        background-color: $menu-bubble-background;
    117156}
    118157
     158/**
     159 * 5.0 Admin Menu
     160 */
    119161
    120 /* Admin Menu */
    121 
    122162#adminmenuback,
    123163#adminmenuwrap,
    124164#adminmenu {
    125165        background: $menu-background;
    126166}
    127167
    128 #adminmenu a {
    129         color: $menu-text;
    130 }
     168#adminmenu {
     169        a {
     170                color: $menu-text;
     171        }
    131172
    132 #adminmenu div.wp-menu-image:before {
    133         color: $menu-icon;
    134 }
     173        .wp-menu-image:before {
     174                color: $menu-icon;
     175        }
    135176
    136 #adminmenu a:hover,
    137 #adminmenu li.menu-top:hover,
    138 #adminmenu li.opensub > a.menu-top,
    139 #adminmenu li > a.menu-top:focus {
    140         color: $menu-highlight-text;
    141         background-color: $menu-highlight-background;
    142 }
     177        a:hover,
     178        li.menu-top:hover,
     179        li.opensub > a.menu-top,
     180        li > a.menu-top:focus {
     181                background-color: $menu-highlight-background;
     182                color: $menu-highlight-text;
     183        }
    143184
    144 #adminmenu li.menu-top:hover div.wp-menu-image:before,
    145 #adminmenu li.opensub > a.menu-top div.wp-menu-image:before {
    146         color: $menu-highlight-icon;
    147 }
     185        li.menu-top:hover .wp-menu-image:before,
     186        li.opensub > a.menu-top div.wp-menu-image:before {
     187                color: $menu-highlight-icon;
     188        }
     189}
    148190
    149 
    150191/* Active tabs use a bottom border color that matches the page background color. */
    151192
    152193.about-wrap h2 .nav-tab-active,
     
    155196        border-bottom-color: $body-background;
    156197}
    157198
     199/**
     200 * 5.1 Admin Menu: submenu
     201 */
    158202
    159 /* Admin Menu: submenu */
    160 
    161203#adminmenu .wp-submenu,
    162204#adminmenu .wp-has-current-submenu .wp-submenu,
    163205#adminmenu .wp-has-current-submenu.opensub .wp-submenu,
     
    181223#adminmenu .wp-has-current-submenu.opensub .wp-submenu a {
    182224        color: $menu-submenu-text;
    183225
    184         &:focus, &:hover {
     226        &:focus,
     227        &:hover {
    185228                color: $menu-submenu-focus-text;
    186229        }
    187230}
    188231
     232/**
     233 * 5.2 Admin Menu: current
     234 */
    189235
    190 /* Admin Menu: current */
    191 
    192236#adminmenu .wp-submenu li.current a,
    193237#adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a,
    194238#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a {
    195239        color: $menu-submenu-current-text;
    196240
    197         &:hover, &:focus {
     241        &:hover,
     242        &:focus {
    198243                color: $menu-submenu-focus-text;
    199244        }
    200245}
    201246
    202247ul#adminmenu a.wp-has-current-submenu:after,
    203248ul#adminmenu > li.current > a.current:after {
    204     border-right-color: $body-background;
     249        border-right-color: $body-background;
    205250}
    206251
    207252#adminmenu li.current a.menu-top,
     
    216261        color: $menu-current-icon;
    217262}
    218263
     264/**
     265 * 5.3 Admin Menu: bubble
     266 */
    219267
    220 /* Admin Menu: bubble */
    221 
    222268#adminmenu .awaiting-mod,
    223269#adminmenu .update-plugins {
    224         color: $menu-bubble-text;
    225270        background: $menu-bubble-background;
     271        color: $menu-bubble-text;
    226272}
    227273
    228274#adminmenu li.current a .awaiting-mod,
    229275#adminmenu li a.wp-has-current-submenu .update-plugins,
    230276#adminmenu li:hover a .awaiting-mod,
    231277#adminmenu li.menu-top:hover > a .update-plugins {
    232         color: $menu-bubble-current-text;
    233278        background: $menu-bubble-current-background;
     279        color: $menu-bubble-current-text;
    234280}
    235281
     282/**
     283 * 5.4 Admin Menu: collapse button
     284 */
    236285
    237 /* Admin Menu: collapse button */
    238 
    239286#collapse-menu {
    240     color: $menu-collapse-text;
     287        color: $menu-collapse-text;
    241288}
    242289
    243290#collapse-menu:hover {
    244     color: $menu-collapse-focus-text;
     291        color: $menu-collapse-focus-text;
    245292}
    246293
    247294#collapse-button div:after {
    248     color: $menu-collapse-icon;
     295        color: $menu-collapse-icon;
    249296}
    250297
    251298#collapse-menu:hover #collapse-button div:after {
    252     color: $menu-collapse-focus-icon;
     299        color: $menu-collapse-focus-icon;
    253300}
    254301
     302/**
     303 * 6.0 Admin Bar
     304 */
    255305
    256 /* Admin Bar */
    257 
    258306#wpadminbar {
    259         color: $menu-text;
    260307        background: $menu-background;
     308        color: $menu-text;
    261309}
    262310
    263311#wpadminbar .ab-item,
     
    280328#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
    281329#wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item,
    282330#wpadminbar .ab-top-menu > li.menupop.hover > .ab-item {
    283         color: $menu-submenu-focus-text;
    284331        background: $menu-submenu-background;
     332        color: $menu-submenu-focus-text;
    285333}
    286334
    287335#wpadminbar > #wp-toolbar li:hover span.ab-label,
     
    297345        color: $menu-highlight-icon;
    298346}
    299347
     348/**
     349 * 6.1 Admin Bar: submenu
     350 */
    300351
    301 /* Admin Bar: submenu */
    302 
    303352#wpadminbar .menupop .ab-sub-wrapper {
    304353        background: $menu-submenu-background;
    305354}
     
    346395        color: $menu-submenu-focus-text;
    347396}
    348397
     398/**
     399 * 6.2 Admin Bar: search
     400 */
    349401
    350 /* Admin Bar: search */
    351 
    352402#wpadminbar #adminbarsearch:before {
    353403        color: $menu-icon;
    354404}
    355405
    356406#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus {
    357         color: $menu-text;
    358407        background: $adminbar-input-background;
     408        color: $menu-text;
    359409}
    360410
    361 #wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { color: $menu-text; opacity: .7; }
    362 #wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { color: $menu-text; opacity: .7; }
    363 #wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { color: $menu-text; opacity: .7; }
    364 #wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { color: $menu-text; opacity: .7; }
     411#wpadminbar #adminbarsearch .adminbar-input {
     412        &::-webkit-input-placeholder,
     413        &:-moz-placeholder,
     414        &::-moz-placeholder,
     415        &:-ms-input-placeholder {
     416                color: $menu-text;
     417                opacity: 0.7;
     418        }
     419}
    365420
     421/**
     422 * 6.3 Admin Bar: my account
     423 */
    366424
    367 /* Admin Bar: my account */
    368 
    369425#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
    370         border-color: $adminbar-avatar-frame;
    371426        background-color: $adminbar-avatar-frame;
     427        border-color: $adminbar-avatar-frame;
    372428}
    373429
    374430#wpadminbar #wp-admin-bar-user-info .display-name {
     
    383439        color: $menu-submenu-text;
    384440}
    385441
     442/**
     443 * 7.0 Pointers
     444 */
    386445
    387 /* Pointers */
    388 
    389446.wp-pointer .wp-pointer-content h3 {
    390447        background-color: $highlight-color;
    391448}
     
    399456        border-bottom-color: $highlight-color;
    400457}
    401458
     459/**
     460 * 8.0 Media Uploader
     461 */
    402462
    403 /* Media Uploader */
    404 
    405463.media-item .bar,
    406464.media-progress-bar div {
    407465        background-color: $highlight-color;
     
    416474        box-shadow: 0 0 0 1px #fff, 0 0 0 2px $highlight-color;
    417475}
    418476
     477/**
     478 * 9.0 Themes
     479 */
    419480
    420 /* Themes */
    421 
    422481.theme-browser .theme.active .theme-name,
    423482.theme-browser .theme.add-new-theme:hover:after {
    424483        background: $highlight-color;
     
    434493        background: $highlight-color;
    435494}
    436495
    437 /* jQuery UI Slider */
     496/**
     497 * 10.0 jQuery UI Slider
     498 */
    438499
    439500.wp-slider .ui-slider-handle,
    440501.wp-slider .ui-slider-handle.ui-state-hover,
    441502.wp-slider .ui-slider-handle.focus {
    442503        background: $button-color;
    443         border-color: darken( $button-color, 10% );
    444         -webkit-box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15);
    445         box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15);
     504        border-color: darken($button-color, 10%);
     505        -webkit-box-shadow: inset 0 1px 0 lighten($button-color, 15%), 0 1px 0 rgba(0, 0, 0, 0.15);
     506        box-shadow: inset 0 1px 0 lighten($button-color, 15%), 0 1px 0 rgba(0, 0, 0, 0.15);
    446507}
    447508
    448 /* Thickbox: Plugin information */
     509/**
     510 * 11.0 Thickbox: Plugin information
     511 */
    449512
    450513#sidemenu a.current {
    451514        background: $body-background;
     
    456519        background: $button-color;
    457520}
    458521
    459 /* Responsive Component */
     522/**
     523 * 12.0 Responsive Component
     524 */
    460525
    461 div#wp-responsive-toggle a:before {
     526#wp-responsive-toggle a:before {
    462527        color: $menu-icon;
    463528}
    464529
    465 .wp-responsive-open div#wp-responsive-toggle a {
     530.wp-responsive-open #wp-responsive-toggle a {
    466531        // ToDo: make inset border
    467         border-color: transparent;
    468532        background: $menu-highlight-background;
     533        border-color: transparent;
    469534}
    470535
    471 .star-rating .star {
    472         color: $highlight-color;
    473 }
    474 
    475536.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a {
    476537        background: $menu-submenu-background;
     538}
     539
     540/**
     541 * 13.0 Miscellaneous
     542 */
     543.star-rating .star {
     544        color: $highlight-color;
    477545}