jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/328576 )

Change subject: Split simple and js-based styles
......................................................................


Split simple and js-based styles

Change-Id: I07b10c74cc83a126518108810eba199839443dce
---
M extension.json
M includes/Hooks.php
A modules/ext.ores.highlighter.css
M modules/ext.ores.styles.css
4 files changed, 26 insertions(+), 15 deletions(-)

Approvals:
  Catrope: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/extension.json b/extension.json
index b12c36a..7c3a30f 100644
--- a/extension.json
+++ b/extension.json
@@ -92,11 +92,18 @@
                "remoteExtPath": "ORES/modules"
        },
        "ResourceModules": {
-               "ext.ores.highlight": {
-                       "position": "top",
+               "ext.ores.highlighter": {
                        "scripts": [
                                "ext.ores.highlighter.js"
                        ],
+                       "styles": "ext.ores.highlighter.css",
+                       "targets": [
+                               "desktop",
+                               "mobile"
+                       ]
+               },
+               "ext.ores.styles": {
+                       "position": "top",
                        "styles": "ext.ores.styles.css",
                        "targets": [
                                "desktop",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 3f64f3c..d14126f 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -538,7 +538,8 @@
                                'oresThresholds',
                                [ 'damaging' => $wgOresDamagingThresholds ]
                        );
-                       $out->addModules( 'ext.ores.highlight' );
+                       $out->addModules( 'ext.ores.highlighter' );
+                       $out->addModuleStyles( 'ext.ores.styles' );
                }
                return true;
        }
diff --git a/modules/ext.ores.highlighter.css b/modules/ext.ores.highlighter.css
new file mode 100644
index 0000000..37828c5
--- /dev/null
+++ b/modules/ext.ores.highlighter.css
@@ -0,0 +1,15 @@
+/**
+ * Make the whole rows yellow
+ */
+
+.damaging[data-ores-damaging='softest'] {
+       background-color: #fc3;
+}
+
+.damaging[data-ores-damaging='soft'] {
+       background-color: #ffe18d;
+}
+
+.damaging[data-ores-damaging='hard'] {
+       background-color: #fef6e7;
+}
diff --git a/modules/ext.ores.styles.css b/modules/ext.ores.styles.css
index 358357f..acb7ce5 100644
--- a/modules/ext.ores.styles.css
+++ b/modules/ext.ores.styles.css
@@ -14,15 +14,3 @@
        background: #fef6e7;
        line-height: 1.8;
 }
-
-.damaging[data-ores-damaging='softest'] {
-       background-color: #fc3;
-}
-
-.damaging[data-ores-damaging='soft'] {
-       background-color: #ffe18d;
-}
-
-.damaging[data-ores-damaging='hard'] {
-       background-color: #fef6e7;
-}

-- 
To view, visit https://gerrit.wikimedia.org/r/328576
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I07b10c74cc83a126518108810eba199839443dce
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to