jenkins-bot has submitted this change and it was merged. Change subject: Cleanup style RL modules for Cite ......................................................................
Cleanup style RL modules for Cite Move the JS which is purely for accessibility purposes into a separate JS RL module named ext.cite.a11y. Move all pure CSS, which is not dependant on accompanying JS into a separate ext.cite.styles module Bug: T101559 Change-Id: I58adcfbcf9af2bb3b6d5dabb6c38c42af78e0416 --- M Cite_body.php M extension.json R modules/ext.cite.a11y.css R modules/ext.cite.a11y.js A modules/ext.cite.styles.css M modules/ext.rtlcite.css 6 files changed, 44 insertions(+), 24 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/Cite_body.php b/Cite_body.php index e5f0a5a..64e2865 100644 --- a/Cite_body.php +++ b/Cite_body.php @@ -171,8 +171,8 @@ $this->mInCite = false; $parserOutput = $parser->getOutput(); - $parserOutput->addModules( 'ext.cite' ); - $parserOutput->addModuleStyles( 'ext.rtlcite' ); + $parserOutput->addModules( 'ext.cite.a11y' ); + $parserOutput->addModuleStyles( 'ext.cite.styles' ); return $ret; } diff --git a/extension.json b/extension.json index 4d20824..e9d04b3 100644 --- a/extension.json +++ b/extension.json @@ -21,23 +21,36 @@ "Cite::setHooks" ] }, + "@comment": "ext.cite and ext.rtlcite are backwards compatibility deployment hacks", "ResourceModules": { "ext.cite": { - "scripts": "ext.cite.js", + "dependencies": [ + "ext.cite.a11y", + "ext.cite.styles" + ], + "position": "bottom" + }, + "ext.rtlcite": { + "styles": "ext.rtlcite.css", + "position": "bottom" + }, + "ext.cite.styles": { "styles": { - "ext.cite.css": {}, + "ext.cite.styles.css": {}, "ext.cite.print.css": { "media": "print" } }, + "position": "bottom" + }, + "ext.cite.a11y": { + "scripts": "ext.cite.a11y.js", + "styles": "ext.cite.a11y.css", "messages": [ "cite_references_link_accessibility_label", "cite_references_link_many_accessibility_label" - ] - }, - "ext.rtlcite": { - "styles": "ext.rtlcite.css", - "position": "top" + ], + "position": "bottom" } }, "ResourceFileModulePaths": { diff --git a/modules/ext.cite.css b/modules/ext.cite.a11y.css similarity index 63% rename from modules/ext.cite.css rename to modules/ext.cite.a11y.css index c808835..4ea7a81 100644 --- a/modules/ext.cite.css +++ b/modules/ext.cite.a11y.css @@ -14,18 +14,3 @@ width: 1px !important; overflow: hidden; } - -.mw-cite-backlink, -.cite-accessibility-label { - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} - -/* Highlight clicked reference in blue to help navigation */ -ol.references li:target, -sup.reference:target { - background-color: #def; /* fallback */ - background-color: rgba(0, 127, 255, 0.133); -} diff --git a/modules/ext.cite.js b/modules/ext.cite.a11y.js similarity index 100% rename from modules/ext.cite.js rename to modules/ext.cite.a11y.js diff --git a/modules/ext.cite.styles.css b/modules/ext.cite.styles.css new file mode 100644 index 0000000..b836fff --- /dev/null +++ b/modules/ext.cite.styles.css @@ -0,0 +1,21 @@ +.mw-cite-backlink, +.cite-accessibility-label { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Isolation to fix references in case of RTL words at the end of a reference */ +sup.reference { + unicode-bidi: -moz-isolate; + unicode-bidi: -webkit-isolate; + unicode-bidi: isolate; +} + +/* Highlight clicked reference in blue to help navigation */ +ol.references li:target, +sup.reference:target { + background-color: #def; /* fallback */ + background-color: rgba(0, 127, 255, 0.133); +} diff --git a/modules/ext.rtlcite.css b/modules/ext.rtlcite.css index 9b88d53..140fc3e 100644 --- a/modules/ext.rtlcite.css +++ b/modules/ext.rtlcite.css @@ -1,3 +1,4 @@ +/* Needs to be deleted after 30 days cache expiration */ /* Isolation to fix references in case of RTL words at the end of a reference */ sup.reference { unicode-bidi: -moz-isolate; -- To view, visit https://gerrit.wikimedia.org/r/216314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I58adcfbcf9af2bb3b6d5dabb6c38c42af78e0416 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: TheDJ <hartman.w...@gmail.com> Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits