mediawiki.notification: Allow skins to style notification area
authorjdlrobson <jdlrobson@gmail.com>
Tue, 21 Apr 2015 22:05:03 +0000 (15:05 -0700)
committerKrinkle <krinklemail@gmail.com>
Thu, 7 May 2015 14:23:14 +0000 (14:23 +0000)
Minerva skin styles notifications at the bottom of the screen. This change
allows Minerva to style notifications consistently. It is a breaking change
for skins that use skinStyles for mediawiki.notification module as these will
now need to be adjusted to add to styles rather than replace.

See: I1645cbb81a3c76a07695d4c3d9a26a1d698f6ff4
Bug: T66565
Change-Id: Iba35692d38a8248096153146bc296b1079352f01

resources/Resources.php
resources/src/mediawiki/mediawiki.notification.common.css [new file with mode: 0644]
resources/src/mediawiki/mediawiki.notification.css

index b32dd33..c8cb3a3 100644 (file)
@@ -981,10 +981,13 @@ return array(
        ),
        'mediawiki.notification' => array(
                'styles' => array(
-                       'resources/src/mediawiki/mediawiki.notification.css',
+                       'resources/src/mediawiki/mediawiki.notification.common.css',
                        'resources/src/mediawiki/mediawiki.notification.hideForPrint.css'
                                => array( 'media' => 'print' ),
                ),
+               'skinStyles' => array(
+                       'default' => 'resources/src/mediawiki/mediawiki.notification.css',
+               ),
                'scripts' => 'resources/src/mediawiki/mediawiki.notification.js',
                'dependencies' => 'mediawiki.page.startup',
                'targets' => array( 'desktop', 'mobile' ),
diff --git a/resources/src/mediawiki/mediawiki.notification.common.css b/resources/src/mediawiki/mediawiki.notification.common.css
new file mode 100644 (file)
index 0000000..a1309c2
--- /dev/null
@@ -0,0 +1,7 @@
+.mw-notification-area {
+       position: absolute;
+}
+
+.mw-notification-area-floating {
+       position: fixed;
+}
index ae399ce..954de22 100644 (file)
@@ -1,5 +1,4 @@
 .mw-notification-area {
-       position: absolute;
        top: 0;
        right: 0;
        padding: 1em 1em 0 0;
@@ -8,10 +7,6 @@
        z-index: 10000;
 }
 
-.mw-notification-area-floating {
-       position: fixed;
-}
-
 .mw-notification {
        padding: 0.25em 1em;
        margin-bottom: 0.5em;