Page MenuHomePhabricator

Fix top spacing for TOC when sticky header not present
Open, Needs TriagePublic

Assigned To
None
Authored By
cjming
Wed, Jun 22, 8:36 PM
Referenced Files
Restricted File
Wed, Jun 22, 8:45 PM
Restricted File
Wed, Jun 22, 8:37 PM

Description

Above desktop breakpoint (1000px), the sticky header is visible for logged in users while the TOC is anchored in the sidebar. When logged in, the top margin of the TOC looks fine but when logged out, the sticky header is no longer visible (only enabled for logged in users at the moment) and the top margin spacing of the TOC looks too big (beyond design spec of ~24px)

{F35265612}
https://phabricator.wikimedia.org/F35260761

Issue visible on prod as anon if you scroll down on https://en.wikipedia.org/wiki/Barack_Obama?useskin=vector-2022&tableofcontents=1

{F35265628}

Developer notes

The .mw-sticky-header-element class overrides top rule for any element ascribed with the class.

https://github.com/wikimedia/Vector/blob/master/resources/skins.vector.styles/components/StickyHeader.less#L148

Acceptance criteria

  • When logged out at above desktop view port, TOC in sidebar has a top spacing that matches design spec.