Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #26609, comment 4


Ignore:
Timestamp:
12/14/2013 07:13:04 AM (12 years ago)
Author:
Veraxus
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26609, comment 4

    v1 v2  
    77Many major front-end frameworks and boilerplates use positioning overrides ( e.g. `position:relative` ) on the `html` and/or `body` elements as routine corrective/normalization practice - so when the admin bar changes from `fixed` to `absolute` positioning, it does '''not''' snap to the top of the ''window'' as expected, but to the top of the `body` element, which has been shifted 46px from the top of the window due to the top margin.
    88
    9 Considering how commonplace explicit `body` element positioning is as a routine normalization practice, I would say that this constitutes a serious problem/oversight.
     9Considering how commonplace explicit `body` element positioning is as a routine normalization practice (particularly when off-canvas layouts are to be employed), I would say that this constitutes a serious problem/oversight.
    1010
    11 To fix this, the top margin for `html` should be set to `0` at `max-width:600px` to ensure there are no conflicts.
     11There are a number of potential fixes, but this should be remedied in core.
     12
     13When the screen is `max-width:600px`, the `html` and `body` should be explicitly set to `position: relative` (which is more common than not, anyway). The admin bar should then be positioned `top:-46px` to compensate. Problem solved.