postEdit: Move MonoBook style to separate file
authorFomafix <fomafix@googlemail.com>
Fri, 8 Sep 2017 09:32:04 +0000 (11:32 +0200)
committerFomafix <fomafix@googlemail.com>
Fri, 8 Sep 2017 09:47:05 +0000 (11:47 +0200)
This avoids loading the MonoBook specific style on other skins.

The !important is not necessary because the skin sepecific styles are
at the end of the file and have a higher priority.

Change-Id: I4ba6c8f63b0082ac82260b20202d31d85328aa40

resources/Resources.php
resources/src/mediawiki.action/mediawiki.action.view.postEdit.less
resources/src/mediawiki.action/mediawiki.action.view.postEdit.monobook.css [new file with mode: 0644]

index 3a5de66..f0aa9ec 100644 (file)
@@ -1506,6 +1506,9 @@ return [
        'mediawiki.action.view.postEdit' => [
                'scripts' => 'resources/src/mediawiki.action/mediawiki.action.view.postEdit.js',
                'styles' => 'resources/src/mediawiki.action/mediawiki.action.view.postEdit.less',
+               'skinStyles' => [
+                       'monobook' => 'resources/src/mediawiki.action/mediawiki.action.view.postEdit.monobook.css',
+               ],
                'dependencies' => [
                        'mediawiki.jqueryMsg',
                        'mediawiki.notification'
index 467928d..e1fa925 100644 (file)
        }
 }
 
-// TODO: Move to monobook skin
-.skin-monobook .postedit {
-       top: 6em !important; /* stylelint-disable-line declaration-no-important */
-}
-
 .postedit-faded {
        opacity: 0;
 }
diff --git a/resources/src/mediawiki.action/mediawiki.action.view.postEdit.monobook.css b/resources/src/mediawiki.action/mediawiki.action.view.postEdit.monobook.css
new file mode 100644 (file)
index 0000000..50f0c8a
--- /dev/null
@@ -0,0 +1,3 @@
+.postedit {
+       top: 6em;
+}