Make WordPress Core

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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26609, comment 4

    v2 v3  
    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 (particularly when off-canvas layouts are to be employed), 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 in core.
    1010
    11 There are a number of potential fixes, but this should be remedied in core.
     11There are a number of potential fixes by theme creators, but this ''should'' be remedied in core.
    1212
    1313When 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.