Parsoid/Parser Unification/Cite CSS

Like all extensions, the Cite extension has localized messages. However, a significant part of the localized messages are for formatting and for localizing the numbering scheme.

Parsoid take a different approach here and uses CSS to support formatting-specific localization of the Cite extension. One of the reasons for this approach is to ensure a good editing experience in editing clients like VisualEditor. When citations are modified (added / removed), the CSS approach ensures the numbers adjust consistently. Otherwise, VE (and other clients) will have to make a server request to rerender all citations each time one is added / removed which can make for a poor / inefficient experience.

Given this difference in how Parsoid handles citation formatting, as we are starting to migrate read views to be based on Parsoid HTML, wikis will have to add CSS rules to their MediaWiki:Common.css files to target citations.

Which wikis are impacted?
Pretty much any wiki that uses localized numbering schemes will be impacted. Specifically, any wiki / language that provides a localized message for one of these Cite extension messages will need equivalent CSS rules:. (TODO: Verify if this are all the ones that need updates).

There are two sources for localization: (1) language-specific localization messages in the Cite extension repository (2) Messages defined on a wiki.

Language localization files in the Cite extension
The list of 28 language localizations are:.

This scenario is easier to handle within the Content Transform Team. We are likely to resolve this via T156350 and these rules will be available for all these language wikis on all projects.

Localized Cite messages on a wiki
This is wiki specific and we don't have a ready made list right now. But, for example, among others, we already know that eswiki, itwiki, knwiki, nlwiki, nowiki will need CSS rules.

Is there a way to see if my wiki is impacted?
Yes, if you open a page that has citations in VisualEditor, and the +citations on the page render differently from outside VE, then your wiki either needs language-specific CSS rules (which we will handle via T156350 as above), or it needs CSS rules to be added to MediaWiki:Common.css which you will need to add.

If your wiki has site messages for one of the message keys above, then you will definitely need CSS rules in MediaWiki:Common.css.

Examples of CSS rules
As part of visual diff testing, we have had to add a number of these CSS rules to the testing repo. You can use these rules as starting points to update your wiki's Common.css. Depending on your wiki's CSS is structured, you may not necessarily want to copy-paste these exact rules into your wiki, but those rules will hopefully make it quicker to update your wiki's CSS.

How can we verify changes?
As above, you can open the page in VisualEditor (after ensuring caches are purged) to see if your CSS fixes have improved the rendering of citations.

Who can be reach out for help / reporting bugs
You can report bugs on Phabricator as always (TODO: Be more specific). You can also reach out to the Content Transform Team either on IRC, email, or on wiki here by posting on this talk page. (TODO: Maybe provide a single place for this?)