Skip to content

Instantly share code, notes, and snippets.

@jdlrobson
Created May 3, 2021 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdlrobson/1cc0d7d3f767e4e66c0b0e9ef6c543ec to your computer and use it in GitHub Desktop.
Save jdlrobson/1cc0d7d3f767e4e66c0b0e9ef6c543ec to your computer and use it in GitHub Desktop.
Use of mw-body-content in MediaWiki.
Skins using this class in CSS [1] use it like follows:
* Vector - layout. Redundant mostly. Will use .mw-body for typography instead if necessary
* BlueSpiceCalumma - used in an overly-qualified CSS rule relating to indicators. Will not be impacted by the change since the class is provided by the skin itself. Another class can be used if specificity is important.
* Metrolook - applies typography. Should apply to #bodyContent instead in the new system.
* Mirage applies typography to `.toc`. Should use `.mw-parser-output` instead.
* BlueSky uses it for layout, will be affected by change (layout shift). Can patch before.
* Anisa - used for responsive images in parser output. Will continue to apply.
* Example (n/a - will always reflect best practices)
* HasSomeColours sets `line-height: 1.5;`, should continue to work.
* Material skin is marked as unmaintained. While impact is possible (possibly background to article content), the skin does not render with 1.35 so cannot be checked.
* MonoBook used on site notice and #bodyContent will result in a div.mw-body-content as a child of a div.mw-body-content. Styling will be unaffected.
* Nimbus will result in a div.mw-body-content as a child of a div.mw-body-content. Only CSS usage is a reset of margin/body which will continue to work unaffected as another rule #article-body overrides that on the new `mw-body-content` element.
* Bouquet will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* CologneBlue used on indicators. Not needed there. No impact.
* DeskMessMirrored will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* Dusk will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* DuskToDawn will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* EUCopyrightCampaignSkin will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* GamesPress will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* GreyStuff will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* Modern used on indicators. Not needed. No impact.
* Refreshed will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* Splash will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
* Timeless adds mw-body-content class to #bodyContent. It doesn't have any mw-body-content specific styles. It will not be impacted and should remove the class after this change.
* WikimediaApiPortal adds a class to site notice but doesn't provide styles. Not clear why, but it can continue to do so if it wishes.
* WoOgLeShades will result in a div.mw-body-content as a child of a div.mw-body-content. It will need to remove its class. It's rule `mw-body-content a > img ` will be unaffected.
* WPTouch will result in a div.mw-body-content as a child of a div.mw-body-content but doesn't provide any styles. so will not be impacted.
@mainframe98
Copy link

@jdlrobson
Copy link
Author

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment