mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-03 03:47:16 +00:00
c91f6c566d
* Transform the action bar to table layout even in non-bundle notifications. * Increase the padding on the side for consistency Bug: T125909 Bug: T125969 Bug: T126686 Change-Id: I26ba5b7a21a1f36774749154d3f95d61254c5ce2
244 lines
4.5 KiB
Plaintext
244 lines
4.5 KiB
Plaintext
@import '../../echo.variables';
|
|
@import '../../echo.mixins';
|
|
|
|
.mw-echo-ui-notificationItemWidget {
|
|
padding: 0.8em 1em;
|
|
background-color: #F1F1F1;
|
|
border-bottom: 1px solid #DDDDDD;
|
|
white-space: normal;
|
|
line-height: 16px;
|
|
|
|
&:hover > a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
&-icon {
|
|
img {
|
|
height: 30px;
|
|
width: 30px;
|
|
}
|
|
|
|
position: absolute;
|
|
}
|
|
|
|
&-content {
|
|
display: inline-block;
|
|
// The icon is 30px and has a 0.8em right margin
|
|
padding-left: ~"calc(30px + 0.8em)";
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
|
|
&-message {
|
|
&-header {
|
|
color: @notification-text-color;
|
|
}
|
|
&-body {
|
|
.mw-echo-ui-mixin-one-line-truncated;
|
|
color: @notification-body-color;
|
|
margin-top: 4px;
|
|
}
|
|
}
|
|
|
|
&-table {
|
|
display: table;
|
|
width: 100%;
|
|
margin-top: 0.8em;
|
|
}
|
|
|
|
&-actions {
|
|
display: table-row;
|
|
font-size: 0.9em;
|
|
|
|
& > &-buttons.oo-ui-buttonSelectWidget {
|
|
display: table-cell;
|
|
vertical-align: top;
|
|
width: 100%;
|
|
}
|
|
|
|
.mw-echo-ui-menuItemWidget {
|
|
&:not(:last-child) {
|
|
margin-right: 1em;
|
|
}
|
|
}
|
|
|
|
&-menu {
|
|
display: table-cell;
|
|
vertical-align: top;
|
|
padding: 0 0.5em;
|
|
|
|
.oo-ui-popupWidget-popup {
|
|
font-size: 1 / 0.8em;
|
|
padding: 0.5em;
|
|
}
|
|
}
|
|
|
|
&-timestamp {
|
|
display: table-cell;
|
|
vertical-align: top;
|
|
color: black;
|
|
opacity: @opacity-low;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
// Table layout only for the content inside bundles
|
|
&-bundle {
|
|
display: table;
|
|
width: ~"calc( 100% - " @bundle-group-padding ~");";
|
|
|
|
.mw-echo-ui-notificationItemWidget-content {
|
|
display: table-row;
|
|
|
|
.mw-echo-ui-notificationItemWidget {
|
|
// CSS table layout
|
|
&-icon,
|
|
&-content-message,
|
|
&-content-actions,
|
|
&-markAsReadButton {
|
|
display: table-cell;
|
|
vertical-align: top;
|
|
}
|
|
|
|
// Positioning fixes for bundled items
|
|
&-icon {
|
|
position: relative;
|
|
padding-right: 0.5em;
|
|
}
|
|
|
|
&-content-message {
|
|
display: table-cell;
|
|
padding-right: 0.5em;
|
|
width: 100%;
|
|
}
|
|
|
|
&-content-actions {
|
|
&-row {
|
|
display: table-row;
|
|
}
|
|
|
|
&-buttons {
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
&-menu {
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
&-timestamp {
|
|
float: none;
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
padding-right: 0.5em;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
&-markAsReadButton {
|
|
width: 1em;
|
|
float: none;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
&-markAsReadButton {
|
|
.mw-echo-ui-mixin-hover-opacity;
|
|
float: right;
|
|
font-size: 1em;
|
|
margin-top: -0.5em;
|
|
margin-right: -0.5em;
|
|
padding: 0;
|
|
|
|
.mw-echo-ui-notificationItemWidget-bundle & {
|
|
font-size: 0.8em;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.oo-ui-iconElement-icon {
|
|
// We have to override oojs-i's width/height,
|
|
// which uses a very specific selector
|
|
width: 1.7em !important;
|
|
height: 1.7em !important;
|
|
}
|
|
}
|
|
|
|
&-initiallyUnseen {
|
|
-webkit-animation-name: unseen-fadeout-to-read;
|
|
animation-name: unseen-fadeout-to-read;
|
|
-webkit-animation-duration: .5s;
|
|
animation-duration: .5s;
|
|
-webkit-animation-delay: 2s;
|
|
animation-delay: 2s;
|
|
-webkit-animation-timing-function: ease-out;
|
|
animation-timing-function: ease-out;
|
|
-webkit-animation-fill-mode: both;
|
|
animation-fill-mode: both;
|
|
|
|
&.mw-echo-ui-notificationItemWidget-unread {
|
|
-webkit-animation-name: unseen-fadeout-to-unread;
|
|
animation-name: unseen-fadeout-to-unread;
|
|
}
|
|
}
|
|
&-unread {
|
|
background-color: white;
|
|
}
|
|
|
|
&.oo-ui-optionWidget-selected,
|
|
&.oo-ui-optionWidget-highlighted {
|
|
background-color: #F9F9F9;
|
|
}
|
|
|
|
&-unread.oo-ui-optionWidget-highlighted {
|
|
background-color: white;
|
|
}
|
|
|
|
// NOTE: The internal styling of the notifications is outside this file, because
|
|
// it also affects the notifications in Special:Notifications
|
|
// These styles are in modules/nojs/ext.echo.notifications.less
|
|
}
|
|
|
|
@-webkit-keyframes unseen-fadeout-to-unread {
|
|
from {
|
|
background-color: @notification-background-unseen;
|
|
}
|
|
to {
|
|
background-color: @notification-background-unread;
|
|
}
|
|
}
|
|
|
|
@keyframes unseen-fadeout-to-unread {
|
|
from {
|
|
background-color: @notification-background-unseen;
|
|
}
|
|
to {
|
|
background-color: @notification-background-unread;
|
|
}
|
|
}
|
|
|
|
@-webkit-keyframes unseen-fadeout-to-read {
|
|
from {
|
|
background-color: @notification-background-unseen;
|
|
}
|
|
to {
|
|
background-color: @notification-background-read;
|
|
}
|
|
}
|
|
|
|
@keyframes unseen-fadeout-to-read {
|
|
from {
|
|
background-color: @notification-background-unseen;
|
|
}
|
|
to {
|
|
background-color: @notification-background-read;
|
|
}
|
|
}
|