mediawiki-extensions-Echo/modules/ooui/styles/mw.echo.ui.NotificationBadgeWidget.less
Moriel Schottlender 429b11148b Replace entire <li> element to produce button and popup separately
We need the button to remain a standalone <a> element so it preserves
the exact same styling as the output we're getting from the PHP. the
only way to do this is to create the widget as the entire <li> and then
replace the original.

Bug: T112218
Change-Id: Ib6fd4369d46cb7f37b14675d63bbce9950abcd48
2015-09-19 17:56:29 +02:00

68 lines
1.5 KiB
Plaintext

@import '../../echo.variables';
// These rules are outside of the LESS nesting because they don't work inside
// the nested rule. These should be very strong so as to override the base styles
#pt-notifications-alert .mw-echo-notifications-badge.oo-ui-flaggedElement-unseen {
background-color: @badge-background-unseen-alert;
}
#pt-notifications-message .mw-echo-notifications-badge.oo-ui-flaggedElement-unseen {
background-color: @badge-background-unseen-message;
}
.mw-echo-ui-notificationBadgeButtonPopupWidget {
position: relative;
.oo-ui-popupWidget-footer {
border-top: 1px solid #DDDDDD;
width: 100%;
.oo-ui-buttonElement {
display: table-cell;
white-space: normal;
font-weight: bold;
width: @notification-popup-width / 2;
box-sizing: border-box;
&:last-child {
border-left: 1px solid #DDDDDD;
}
> .oo-ui-buttonElement-button {
display: block;
line-height: 4em;
margin: 0;
border: 0;
}
}
}
.oo-ui-popupWidget {
// #p-personal li has a font-size of 0.75em, but we want the
// font size here to be exactly 0.875em, so we must override
// the parent em sizing by dividing.
font-size: 0.875em / 0.75em;
// Align the popup with the center of the button
left: 1em;
}
.oo-ui-popupWidget-head {
height: 3.5em;
> .oo-ui-iconWidget {
float: left;
margin: 0.7em 0 1em 1em;
}
> .oo-ui-labelElement-label {
font-size: 1.2em;
padding: 0.3em;
margin-left: 0;
font-weight: bold;
}
.mw-echo-ui-notificationsWidget-markAllReadButton {
margin: 1.25em 1em;
}
}
}