Making WordPress.org

Changeset 11489


Ignore:
Timestamp:
01/31/2022 03:16:33 AM (3 years ago)
Author:
dd32
Message:

Translate: Restore translation headers sticking to the viewport, and use a new global variable for the header height.

position: sticky only works within a scrollable element, and by adding overflow:auto it causes the element to no longer be a scrollable item, so nothing to stick to.
Most GlotPress tables have a <p class="clear... present after .gp-content which would result in the GlotPress footer elements clearing, but the consistency page does not have this, resulting in the navigation being rendered outside of the .gp-content bounding box.
Applying a .clearfix class to .gp-content appears to work with all these pages instead.

See [11470], #6046.
Fixes https://github.com/WordPress/wporg-mu-plugins/issues/124

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/header.php

    r11445 r11489  
    3535</header>
    3636
    37 <div class="gp-content">
     37<div class="gp-content clearfix">
    3838
    3939    <div id="gp-js-message"></div>
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/style.css

    r11471 r11489  
    1 :root {
    2     /* It doesn't stick on mobile. That may change soon though, see https://github.com/WordPress/wporg-news-2021/issues/181. */
    3     --global-header-height: 0;
    4 }
    5 
    6 @media screen and (min-width: 890px) {
    7     :root {
    8         --global-header-height: 103px;
    9     }
    10 }
    11 
    121body, html {
    132    height: 100%;
     
    310299    max-width: 940px;
    311300    padding: 0 10px;
    312     overflow: auto;
    313301}
    314302
     
    22372225    position: -webkit-sticky;
    22382226    position: sticky;
    2239     top: calc( var(--global-header-height) + var(--wp-admin--admin-bar--height) + 100px );
     2227    top: calc( var(--wp-global-header-height) + var(--wp-admin--admin-bar--height) + 100px );
    22402228    padding: 20px 0 10px;
    22412229    background: #fff;
     
    25352523    .admin-bar .editor-panel__left .panel-header,
    25362524    .admin-bar .editor-panel__right {
    2537         top: calc( var(--global-header-height) + var(--wp-admin--admin-bar--height) );
     2525        top: calc( var(--wp-global-header-height) + var(--wp-admin--admin-bar--height) );
    25382526    }
    25392527}
Note: See TracChangeset for help on using the changeset viewer.