| 1 |
@import 'mediawiki.skin.variables.less'; |
| 2 |
@import '../echo.variables.less'; |
| 3 |
|
| 4 |
/* stylelint-disable no-descending-specificity */ |
| 5 |
/* We have to include the #pt-notifications selector due to monobook */ |
| 6 |
.mw-echo-notifications-badge { |
| 7 |
#pt-notifications-alert &, |
| 8 |
#pt-notifications-notice & { |
| 9 |
position: relative; |
| 10 |
display: block; |
| 11 |
box-sizing: border-box; |
| 12 |
width: 20px; |
| 13 |
height: 20px; |
| 14 |
margin: 0 2px; |
| 15 |
// Hide the text, but keep accessible for screen-readers |
| 16 |
// Later we put the counter back onscreen with a zero text-indent |
| 17 |
top: 0; |
| 18 |
text-indent: -9999px; |
| 19 |
border-radius: @border-radius-base; |
| 20 |
cursor: pointer; |
| 21 |
text-decoration: none; |
| 22 |
line-height: normal; |
| 23 |
opacity: 0.87; |
| 24 |
color: transparent; |
| 25 |
|
| 26 |
&:hover, |
| 27 |
&:active, |
| 28 |
&:focus { |
| 29 |
outline: @outline-base--focus; |
| 30 |
} |
| 31 |
|
| 32 |
&:focus { |
| 33 |
box-shadow: 0 0 0 1px #fff, 0 0 0 3px #36c; |
| 34 |
opacity: 1; |
| 35 |
|
| 36 |
&::after { |
| 37 |
border-color: @border-color-progressive--focus; |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
// Counter |
| 42 |
&::after { |
| 43 |
position: absolute; |
| 44 |
display: inline-block; |
| 45 |
cursor: pointer; |
| 46 |
// Bring it back onscreen |
| 47 |
top: 9px; |
| 48 |
text-indent: 0; |
| 49 |
left: 55%; |
| 50 |
font-size: 0.9em; |
| 51 |
font-weight: bold; |
| 52 |
padding: 0 0.3em; |
| 53 |
border: @border-width-base @border-style-base @border-color-inverted; |
| 54 |
border-radius: @border-radius-base; |
| 55 |
background-color: @badge-counter-background-seen; |
| 56 |
content: attr( data-counter-text ); |
| 57 |
color: @color-inverted; |
| 58 |
} |
| 59 |
|
| 60 |
&-dimmed { |
| 61 |
opacity: 0.4; |
| 62 |
} |
| 63 |
|
| 64 |
&.mw-echo-notifications-badge-long-label { |
| 65 |
margin-right: 0.5em; |
| 66 |
|
| 67 |
&::after { |
| 68 |
left: 35%; |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
&.mw-echo-notifications-badge-all-read { |
| 73 |
opacity: 0.51; |
| 74 |
|
| 75 |
&::after { |
| 76 |
visibility: hidden; |
| 77 |
} |
| 78 |
} |
| 79 |
} |
| 80 |
|
| 81 |
&.oo-ui-flaggedElement-unseen, |
| 82 |
&.mw-echo-unseen-notifications { |
| 83 |
#pt-notifications-alert &::after { |
| 84 |
background-color: @background-color-destructive; |
| 85 |
} |
| 86 |
|
| 87 |
#pt-notifications-notice &::after { |
| 88 |
background-color: @background-color-progressive; |
| 89 |
} |
| 90 |
} |
| 91 |
} |
| 92 |
/* stylelint-enable no-descending-specificity */ |