Making WordPress.org


Ignore:
Timestamp:
11/09/2017 10:26:44 PM (7 years ago)
Author:
obenland
Message:

Main: Avoid current menu item stlyes

Maintains button visual, even if it's the current menu item.

See [6100].
See #2861.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/css/components/_wporg-header.scss

    r6100 r6101  
    127127                    color: #eee;
    128128                }
    129 
    130                 &.current {
     129            }
     130
     131            &.current,
     132            &.current-menu-item {
     133                a {
    131134                    color: #eee;
    132135                }
     136            }
     137
     138            .uparrow {
     139                display: none;
    133140            }
    134141        }
     
    158165    .download-button {
    159166        background: #21759b linear-gradient(to bottom, #2a95c5, #21759b);
     167        border-bottom-color: #1e6a8d;
    160168        border-color: #21759b;
    161         border-bottom-color: #1e6a8d;
    162169        box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 );
    163170
     
    252259
    253260        h2.rosetta {
     261            float: left;
    254262            padding: 36px 27px 0;
    255             float: left;
    256263        }
    257264
    258265        #wporg-header-menu {
     266            float:left;
     267            list-style: none;
     268            margin: -15px 0 0;
     269            max-width: inherit;
     270            min-width: 0;
     271            padding: 0;
    259272            position: static;
    260             float:left;
    261             margin: -15px 0 0;
    262             padding: 0;
    263             min-width: 0;
    264             max-width: inherit;
    265273            width: 100%;
    266             list-style: none;
    267274        }
    268275
     
    272279
    273280            a {
     281                color: #eee;
     282                display: block;
    274283                font-family: "Open Sans", Helvetica, Arial, "Liberation Sans", sans-serif;
     284                font-size: 13px;
    275285                font-weight: 600;
    276                 display: block;
     286                height: 46px;
    277287                line-height: 34px;
     288                margin: 0 4px;
    278289                padding: 0 6px;
    279                 margin: 0 4px;
    280                 font-size: 13px;
    281                 color: #eee;
    282                 height: 46px;
    283290
    284291                &.current ~ .uparrow {
    285                     width: 0;
    286                     height: 0;
     292                    border-bottom: 9px solid #f7f7f7;
    287293                    border-left: 9px solid transparent;
    288294                    border-right: 9px solid transparent;
    289                     border-bottom: 9px solid #f7f7f7;
     295                    height: 0;
    290296                    margin: -8px auto 0 auto;
    291                 }
    292             }
    293 
    294             &#download .uparrow {
    295                 display:none;
     297                    width: 0;
     298                }
    296299            }
    297300
    298301            &.current-menu-item:after,
    299302            &.current_page_parent:after {
    300                 content: '';
    301                 position: absolute;
    302                 left: 50%;
    303                 width: 0;
    304                 height: 0;
     303                border-bottom: 9px solid #f7f7f7;
    305304                border-left: 9px solid transparent;
    306305                border-right: 9px solid transparent;
    307                 border-bottom: 9px solid #f7f7f7;
     306                content: '';
     307                height: 0;
     308                left: 50%;
    308309                margin: -8px 0 0 -9px;
     310                position: absolute;
     311                width: 0;
    309312            }
    310313
    311314            &:hover .nav-submenu ~ .uparrow,
    312315            .nav-submenu:hover ~ .uparrow {
    313                 width: 0;
    314                 height: 0;
     316                border-bottom: 9px solid #32373c;
    315317                border-left: 9px solid transparent;
    316318                border-right: 9px solid transparent;
    317                 border-bottom: 9px solid #32373c;
     319                height: 0;
    318320                margin: -10px auto 0 auto;
     321                width: 0;
    319322            }
    320323
     
    323326
    324327                a {
    325                     margin-left: 6px;
    326328                    height: 34px;
    327329                    line-height: 34px;
     330                    margin-left: 6px;
    328331                }
    329332            }
     
    331334
    332335        .nav-submenu {
    333             display:none!important;/* Prevents #wporg-header ul overwriting this */
     336            background: #32373c;
     337            border: #32373c solid 1px;
     338            border-top: 0;
     339            display: none !important;/* Prevents #wporg-header ul overwriting this */
     340            margin-top: -1px;
    334341            min-width: 0;
    335             background: #32373c;
    336             margin-top: -1px;
    337             border: #32373c solid 1px;
    338             border-top:0;
    339342        }
    340343
    341344        ul li:hover .nav-submenu,
    342345        ul li .nav-submenu:hover {
    343             display:block!important;/* Prevents #wporg-header ul overwriting this */
    344             position:absolute;
    345             top:46px;
     346            display: block !important;/* Prevents #wporg-header ul overwriting this */
    346347            left:0;
    347             z-index:101;
    348348            margin-left:0;
    349             width:auto;
     349            position: absolute;
     350            top: 46px;
     351            width: auto;
     352            z-index: 101;
    350353        }
    351354
     
    413416        display: none;
    414417    }
     418
     419    -webkit-font-smoothing: antialiased;
    415420}
    416421
Note: See TracChangeset for help on using the changeset viewer.