jenkins-bot has submitted this change and it was merged.
Change subject: Smaller banner close box - some whitespace around box tappable.
......................................................................
Smaller banner close box - some whitespace around box tappable.
Change-Id: I46e67fe2b4a04ba3a4cf831d810d46c1fc2c92ef
---
M includes/PageRenderingHooks.php
M modules/banner.css
2 files changed, 29 insertions(+), 19 deletions(-)
Approvals:
Dr0ptp4kt: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index abed18f..d7e5346 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -281,30 +281,29 @@
$carrierLink = '';
}
- $customStyle = 'background:' . $config['background'] .
- ';color:' . $config['foreground'] . ';';
- $customStyleFontSize = $config['fontSize'] !== '' ? '
font-size:' . $config['fontSize'] . ';' : '';
+ $background = $config['background'];
+ $foreground = $config['foreground'];
$carrierLink = str_replace(
'<a href="',
- '<a style="color:' . $config['foreground'] . ';"
href="',
+ "<a style=\"color:$foreground;\" href=\"",
$carrierLink );
- $customStyleNotifyClose = 'background-color:' .
$config['background'] .
- ';border: 2px solid ' . $config['foreground'] . ';';
$bannerText = Html::rawElement( 'span',
array(
'class' => 'mw-mf-message',
- 'id' => 'zero-rated-banner-text', 'style' =>
$customStyleFontSize ),
- $carrierLink );
- $banner = Html::rawElement( 'div',
- array(
- 'class' => 'mw-mf-banner',
- 'style' => ( $lang === null ? 'display:none;' :
'' ) . $customStyle,
- 'id' => 'zero-rated-banner'
+ 'id' => 'zero-rated-banner-text',
+ 'style' => $config['fontSize'] !== '' ? '
font-size:' . $config['fontSize'] . ';' : ''
),
- '<button style="padding:0.5em;' .
$customStyleNotifyClose . $customStyle .
- '" class="notify-close" title="' .
- wfMessage(
'zero-rated-mobile-access-dismiss-notification' )->escaped() .
- '">×</button>' . $bannerText );
+ $carrierLink );
+ $dismissTitle = wfMessage(
'zero-rated-mobile-access-dismiss-notification' )->escaped();
+ $displayNone = $lang === null ? 'display:none;' : '';
+ $banner = <<<END
+<div id="zero-rated-banner" class="mw-mf-banner"
style="background:$background;color:$foreground;$displayNone">
+<button class="notify-close" style="background:$background;"
title="$dismissTitle">
+<span class="notify-close-x"
style="background:$background;border-color:$foreground;color:$foreground;">×</span>
+</button>
+$bannerText
+</div>
+END;
return $banner;
}
diff --git a/modules/banner.css b/modules/banner.css
index 4b96a8d..1514dc5 100644
--- a/modules/banner.css
+++ b/modules/banner.css
@@ -34,9 +34,20 @@
position: relative;
top: 0;
background-color: #FAD163;
- margin: 2px;
- border: 2px solid #735005;
+ margin: 0px;
float: right;
+ padding: 8px 4px 7px 4px;
+ border:0;
+}
+
+.mw-mf-banner span.notify-close-x {
+ display:block;
+ background-color: #FAD163;
+ margin:0px;
+ border: 2px solid #735005;
+ padding: 1px 0px;
+ height:1.1em;
+ width:1.3em;
}
.mw-mf-banner p {
line-height: normal;
--
To view, visit https://gerrit.wikimedia.org/r/68553
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I46e67fe2b4a04ba3a4cf831d810d46c1fc2c92ef
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits