Making WordPress.org


Ignore:
Timestamp:
10/27/2017 06:47:58 PM (9 years ago)
Author:
obenland
Message:

Main: Style updates.

  • Fixes a bug where pages were misaligned.
  • Underlines links in entry content and lists. Fixes #3216.
  • Improves comment metadata and reply.
  • Adds wporg header styles in case we ever get to a point where we can ditch wp4.css.

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

    r5998 r6058  
    11#wporg-header {
     2        background: #23282d;
     3        height: 140px;
     4        position: relative;
     5        text-align: center;
     6        width: 100%;
     7
     8        .wrapper {
     9                margin: 0 auto;
     10                max-width: 960px;
     11        }
     12
    213        h1 {
     14                display: inline-block;
    315                margin: auto;
     16                width: 303px;
     17
     18                a {
     19                        background: url( //s.w.org/style/images/wp-header-logo.png?1 ) center left no-repeat;
     20                        background-size: 303px 53px;
     21                        display: block;
     22                        height: 88px;
     23                        text-indent: -9999px;
     24                        width: 303px;
     25
     26                        @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
     27                        only screen and (min-resolution: 1.5dppx),
     28                        only screen and (min-resolution: 144dpi) {
     29                                background-image: url( //s.w.org/style/images/wp-header-logo-2x.png?1 );
     30                        }
     31                }
    432        }
    533
    634        h2.rosetta {
    735                clear: none;
    8         }
    9 
    10         form input {
    11                 box-sizing: content-box;
     36                color: #dfdfdf;
     37                font-family: Georgia, "Times New Roman", serif;
     38                font-size: 30px;
    1239                margin: 0;
    13                 padding: 3px;
    14         }
    15 
    16         .button {
    17                 box-shadow: none;
     40
     41                a {
     42                        border-bottom: none;
     43                        color: #dfdfdf;
     44                        display: block;
     45                        height: 52px; /* 88 header height - 36 top padding */
     46                        line-height: 22px;
     47                        padding: 0;
     48                }
     49        }
     50
     51        #wporg-header-menu {
     52                background: #23282d;
     53                left: -75%;
     54                list-style: none;
     55                margin: 0;
     56                max-width: 75%;
     57                min-width: 200px;
     58                padding: 20px 0 0;
     59                position: absolute;
     60                text-align: left;
     61                transition: left 0.3s;
     62                z-index: 100000;
     63
     64                &.active {
     65                        left: 0;
     66                }
     67        }
     68
     69        ul li {
     70                list-style-type:none;
     71                position:relative;
     72
     73                a {
     74                        color: #eee;
     75                        display: block;
     76                        font-family: "Open Sans", Helvetica, Arial, "Liberation Sans", sans-serif;
     77                        font-size: 13px;
     78                        font-weight: 600;
     79                        height: 34px;
     80                        line-height: 34px;
     81                        margin: 0 4px;
     82                        padding: 10px 30px;
     83                        text-decoration: none;
     84
     85                        &.subcurrent {
     86                                font-weight: bold;
     87                        }
     88
     89                        @include breakpoint( sm ) {
     90                                height: auto;
     91                        }
     92                }
     93
     94                &#download {
     95                        float: right;
     96                        height: 34px;
     97                        margin-right: 14px;
     98                        overflow: hidden;
     99                        padding: 0 0 34px;
     100
     101                        @media screen and (max-width:820px) {
     102                                display: none;
     103                        }
     104
     105                        @media screen and (max-width:768px) {
     106                                display: block;
     107                                float: none;
     108                                margin: 10px 20px 20px;
     109                                padding-bottom: 0;
     110                                height: auto;
     111
     112                                a {
     113                                        padding: 4px 10px;
     114                                }
     115                        }
     116
     117                        a {
     118                                margin: 0;
     119                                padding: 0 16px;
     120
     121                                &:hover {
     122                                        color: #eee;
     123                                }
     124
     125                                &.current {
     126                                        color: #eee;
     127                                }
     128                        }
     129                }
     130
     131                a:hover,
     132                a.current,
     133                &.current-menu-item a,
     134                &.current_page_parent a {
     135                        color: #45bbe6;
     136                }
     137        }
     138
     139        .nav-submenu {
     140                display: none;
     141                margin-bottom: 10px;
     142                margin-top: -15px;
     143                padding: 0;
     144                position: static;
     145
     146                li a {
     147                        height: 24px;
     148                        line-height: 24px;
     149                        margin-left: 20px;
     150                }
    18151        }
    19152
    20153        .download-button {
    21                 background-color: #21759b;
    22                 background-image: linear-gradient(to bottom, #2a95c5, #21759b);
     154                background: #21759b linear-gradient(to bottom, #2a95c5, #21759b);
     155                border-color: #21759b;
    23156                border-bottom-color: #1e6a8d;
    24                 border-color: #21759b;
    25157                box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 );
    26158
    27159                &:hover,
    28160                &:focus {
    29                         background-color: #278ab7;
    30                         background-image: linear-gradient(to bottom, #2e9fd2, #21759b);
     161                        background: #278ab7 linear-gradient(to bottom, #2e9fd2, #21759b);
    31162                        border-color: #1b607f;
    32163                        box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
    … …  
    36167
    37168                &:active {
    38                         background: #1b607f;
    39                         background-image: linear-gradient(to bottom, #21759b, #278ab7);
     169                        background: #1b607f linear-gradient(to bottom, #21759b, #278ab7);
    40170                        border-color: #124560 #2382ae #2382ae #2382ae;
    41171                        box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
    … …  
    46176        }
    47177
    48         a:hover,
    49         a:focus,
    50         a:active {
    51                 text-decoration: none;
    52         }
    53 
    54         @include breakpoint( sm ) {
    55                 ul li a {
    56                         height: auto;
    57                 }
    58         }
    59 
    60         @include breakpoint( 769px ) {
     178        #head-search {
     179                @include breakpoint( $sm ) {
     180                        float: right;
     181                        margin-right: 14px;
     182                        padding-top: 30px;
     183                }
     184
     185                form {
     186                        border-bottom: 1px solid #3f3f3f;
     187                        display: inline-block;
     188                        margin-left: 60px;
     189                        width: 288px;
     190
     191                        input.text {
     192                                background: #191e23;
     193                                border: 0;
     194                                border-radius: 0;
     195                                box-sizing: content-box;
     196                                color: #b4b9be;
     197                                float: left;
     198                                font-family: "Open Sans", sans-serif;
     199                                font-size: 12px;
     200                                height: 24px;
     201                                margin: 0;
     202                                outline: none;
     203                                padding: 3px;
     204                                vertical-align: top;
     205                                width: 256px;
     206
     207                                &::-moz-placeholder {
     208                                        color: #eee;
     209                                }
     210
     211                                @media screen and (max-width:480px) {
     212                                        width: 216px;
     213                                }
     214                        }
     215
     216                        .button {
     217                                background: #191e23 url( //s.w.org/wp-includes/images/admin-bar-sprite.png?d=20120831 ) no-repeat 2px 4px;
     218                                border: none;
     219                                border-radius: 0;
     220                                box-shadow: none;
     221                                float: left;
     222                                height: 30px;
     223                                margin: 0;
     224                                padding: 0;
     225                                text-shadow: none !important;
     226                                width: 26px;
     227                        }
     228
     229                        @include breakpoint( 0, 480px ) {
     230                                width: 248px;
     231                        }
     232
     233                        @include breakpoint( 480px ) {
     234                                margin-left: 0;
     235                        }
     236                }
     237        }
     238
     239        @include breakpoint( $sm ) {
     240                height: 120px;
     241                text-align: inherit;
     242
     243                h1 {
     244                        float: left;
     245                        padding-left: 10px;
     246                }
     247
     248                h2.rosetta {
     249                        padding: 36px 27px 0;
     250                        float: left;
     251                }
     252
     253                #wporg-header-menu {
     254                        position: static;
     255                        float:left;
     256                        margin: -15px 0 0;
     257                        padding: 0;
     258                        min-width: 0;
     259                        max-width: inherit;
     260                        width: 100%;
     261                        list-style: none;
     262                }
     263
     264                ul li {
     265                        float: left;
     266                        position:relative;
     267
     268                        a {
     269                                font-family: "Open Sans", Helvetica, Arial, "Liberation Sans", sans-serif;
     270                                font-weight: 600;
     271                                display: block;
     272                                line-height: 34px;
     273                                padding: 0 6px;
     274                                margin: 0 4px;
     275                                font-size: 13px;
     276                                color: #eee;
     277                                height: 46px;
     278
     279                                &.current ~ .uparrow {
     280                                        width: 0;
     281                                        height: 0;
     282                                        border-left: 9px solid transparent;
     283                                        border-right: 9px solid transparent;
     284                                        border-bottom: 9px solid #f7f7f7;
     285                                        margin: -8px auto 0 auto;
     286                                }
     287                        }
     288
     289                        &#download .uparrow {
     290                                display:none;
     291                        }
     292
     293                        &.current-menu-item:after,
     294                        &.current_page_parent:after {
     295                                content: '';
     296                                position: absolute;
     297                                left: 50%;
     298                                width: 0;
     299                                height: 0;
     300                                border-left: 9px solid transparent;
     301                                border-right: 9px solid transparent;
     302                                border-bottom: 9px solid #f7f7f7;
     303                                margin: -8px 0 0 -9px;
     304                        }
     305
     306                        &:hover .nav-submenu ~ .uparrow,
     307                        .nav-submenu:hover ~ .uparrow {
     308                                width: 0;
     309                                height: 0;
     310                                border-left: 9px solid transparent;
     311                                border-right: 9px solid transparent;
     312                                border-bottom: 9px solid #32373c;
     313                                margin: -10px auto 0 auto;
     314                        }
     315
     316                        .nav-submenu li {
     317                                float: none;
     318
     319                                a {
     320                                        margin-left: 6px;
     321                                        height: 34px;
     322                                        line-height: 34px;
     323                                }
     324                        }
     325                }
     326
     327                .nav-submenu {
     328                        display:none!important;/* Prevents #wporg-header ul overwriting this */
     329                        min-width: 0;
     330                        background: #32373c;
     331                        margin-top: -1px;
     332                        border: #32373c solid 1px;
     333                        border-top:0;
     334                }
     335
     336                ul li:hover .nav-submenu,
     337                ul li .nav-submenu:hover {
     338                        display:block!important;/* Prevents #wporg-header ul overwriting this */
     339                        position:absolute;
     340                        top:46px;
     341                        left:0;
     342                        z-index:101;
     343                        margin-left:0;
     344                        width:auto;
     345                }
     346
     347                #headline h2 {
     348                        text-rendering: optimizeLegibility;
     349                }
     350
    61351                ul li.current-menu-item:after,
    62352                ul li.current_page_parent:after,
    … …  
    65355
    66356                        body.blog &,
     357                        body.search &,
    67358                        body.single &,
    68359                        body.archive & {
    … …  
    72363        }
    73364}
     365
     366#mobile-menu-button {
     367        display: block;
     368        float: left;
     369        font-family: 'dashicons';
     370        font-size: 16px;
     371        font-style: normal;
     372        font-weight: normal;
     373        height: 32px;
     374        left: 10px;
     375        line-height: 1;
     376        position: absolute;
     377        text-align: center;
     378        text-decoration: inherit;
     379        top: 75px;
     380        transition: color .1s ease-in;
     381        vertical-align: top;
     382        width: 39px;
     383        -webkit-font-smoothing: antialiased;
     384
     385        &:before {
     386                border: none;
     387                box-sizing: border-box;
     388                color: #888;
     389                content: '\f228';
     390                display: inline-block;
     391                float: left;
     392                font: normal 50px/1 'Dashicons';
     393                height: 32px;
     394                margin: 0;
     395                outline: none;
     396                padding: 3px;
     397                text-decoration: none;
     398                vertical-align: middle;
     399                width: 39px;
     400                -webkit-font-smoothing: antialiased;
     401        }
     402
     403        &:hover {
     404                background:none;
     405        }
     406
     407        @include breakpoint( $sm ) {
     408                display: none;
     409        }
     410}
     411
     412#download-mobile {
     413        background: #f7f7f7;
     414        border-bottom: 1px solid #dddddd;
     415
     416        .wrapper {
     417                padding: 20px 0;
     418                text-align: center;
     419        }
     420
     421        span.download-ready {
     422                font-size: 1.6em;
     423                margin: 0 0.25em;
     424        }
     425
     426        a.download-button {
     427                font-size: 1.6em;
     428                height: inherit;
     429                margin: 10px 0.25em;
     430                padding: 10px 15px;
     431        }
     432}
Note: See TracChangeset for help on using the changeset viewer.