Page MenuHomePhabricator

Scope CSS styles loaded from mediawiki.diff.styles dependencies on Minerva
Open, LowPublicBUG REPORT

Assigned To
None
Authored By
SerDIDG
Fri, May 16, 10:25 AM
Referenced Files
F60059403: firefox_vdppRMrZS7.png
Fri, May 16, 10:25 AM
F60059465: image.png
Fri, May 16, 10:25 AM
F60059411: image.png
Fri, May 16, 10:25 AM
F60059383: image.png
Fri, May 16, 10:25 AM
Subscribers

Description

I'm working on a user script to dynamically load diff content — https://commons.wikimedia.org/wiki/User:Serhio_Magpie/Instant_Diffs. Some of the required dependencies load styles that unintentionally affect the page layout. At the moment, I’m using a set of override hacks to neutralize these styles. Perhaps these styles could be scoped more appropriately in the future.

Steps to replicate the issue:

  • Turn on Advanced mode in the Settings.
  • Open [[Special:Watchlist]]
  • Load a dependency in the console: mw.loader.load( 'mediawiki.diff.styles' );

What happens?:
The dependency loads additional CSS styles that are not scoped within the parent class (see the user icon that appears):

image.png (599×414 px, 24 KB)
image.png (180×364 px, 11 KB)
image.png (96×865 px, 9 KB)

What should have happened instead?:
Styles should remain unchanged. Consider scoping the dependency styles to table.diff.

firefox_vdppRMrZS7.png (564×414 px, 16 KB)