Page MenuHomePhabricator

StickyHeaders: Document browser compatibility policy on project page
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

The style linter is flagging the usage of unsupported CSS properties: position: sticky and scroll-margin-top. If we intend to use properties that are unsupported in MediaWiki's modern grade A browsers, we should document a browser compatibility policy on the MediaWiki project page.

Browser compatibility:

Linter output:

Running "stylelint:all" (stylelint) task
>> resources/ext.readerExperiments.stickyHeaders.styles/stickyHeaders.less
>>    5:2  ⚠  Unexpected browser feature "css-sticky" is not supported by Chrome 49,50,51,52,53,54,55                                             plugin/no-unsupported-browser-features
>>   12:4  ⚠  Unexpected browser feature "css-snappoints" is not supported by Chrome 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68  plugin/no-unsupported-browser-features
>> 
>> resources/ext.readerExperiments.stickyHeaders.legacy/styles/overrides.less
>>    9:3  ⚠  Unexpected browser feature "css-sticky" is not supported by Chrome 49,50,51,52,53,54,55                                             plugin/no-unsupported-browser-features
>>   16:4  ⚠  Unexpected browser feature "css-snappoints" is not supported by Chrome 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68  plugin/no-unsupported-browser-features
>> 
>> ⚠ 4 problems (0 errors, 4 warnings)

Requirements

  • Consider adding CSS to improve support with older versions of Safari - older iPhone (cant upgrade to newer version)
  • Convert task - Lets check the status on the legacy status
  • Do a quick test on legacy version of iOS 12
  • Webkit sticky and position sticky
  • Look into how to test in old browsers

Acceptance Criteria

Event Timeline

HSwan-WMF moved this task from Incoming/Inbox to Needs Refinement on the Reader Growth Team board.
HSwan-WMF set the point value for this task to 2.Nov 25 2025, 5:22 PM

We intentionally use position: sticky and scroll-margin / scroll-snap to implement the sticky header.
We’ve tested on iPhone 11 Safari 13 via BrowserStack and behaviour is normal.

Screenshot 2025-12-03 at 9.27.23 PM.png (1×916 px, 701 KB)

The stylelint warnings are about Chrome 49–68; those are below MediaWiki’s modern grade-A target, so we’re treating these features as progressive enhancement and will:

  • either adjust browserslist to match MediaWiki’s grade-A support, or
  • configure plugin/no-unsupported-browser-features to ignore css-sticky / css-snappoints for this module.

Change #1214750 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/extensions/ReaderExperiments@master] Adds ignore lines to suppress warnings

https://gerrit.wikimedia.org/r/1214750

Thanks @KSarabia-WMF! For clarity, I was initially concerned about compatibility with grade A Safari and iOS Safari browsers. Based on the compatibility charts on MDN, position: sticky is unsupported in Safari < 13 and iOS Safari < 13, while scroll-margin-top is unsupported in Safari < 14.1 and iOS Safari < 14.5.

Tested this patch 1214750 locally, and confirmed that it ignores the linter rule and suppresses the "not supported by Chrome" warnings.

Running "stylelint:all" (stylelint) task
>> Linted 3 files without errors

I won't move this to sign-off yet because it's not clear if anything else needs to be done based on requirements/acceptance criteria. Anything else needed?

Change #1214750 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Adds ignore lines to suppress warnings

https://gerrit.wikimedia.org/r/1214750

@lwatson I don't think anything else is needed.