Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F16979341
mw.echo.badge.less
Mvasa1 (manoj)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
Mvasa1
Apr 14 2018, 8:12 PM
2018-04-14 20:12:52 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
mw.echo.badge.less
View Options
@
import
'../echo.variables'
;
@
import
'mediawiki.mixins'
;
/* stylelint-disable no-descending-specificity */
/* We have to include the #pt-notifications selector due to monobook */
.
mw-echo-notifications-badge
{
#pt-notifications-alert
&,
#pt-notifications-notice
&
{
position
:
relative
;
display
:
block
;
width
:
20
px
;
height
:
20
px
;
margin
:
0
2
px
;
//
Hide
the
text,
but
keep
accessible
for
screen-readers
//
Later
we
put
the
icons
back
onscreen
with
an
opposite
offset
top
:
-@
badge-offscreen-offset
-
5
px
;
cursor
:
pointer
;
text-decoration
:
none
;
line-height
:
normal
;
.box-sizing(
border-box
)
;
&:hover,
&:active,
&:focus
{
border-radius
:
2
px
;
outline
:
0
;
-moz-
outline-style
:
0
;
&:before{
border-radius
:
2
px
;
box-shadow
:
inset
0
0
0
2
px
#36c
;
}
&
:
after
{
background-color
:
#36c
;
}
}
&
-dimmed
{
opacity
:
0.4
;
}
//
Background
icon
&
:
before
{
position
:
absolute
;
display
:
inline-block
;
cursor
:
pointer
;
opacity
:
0.8
;
content
:
''
;
background-repeat
:
no-repeat
;
//
Bring
it
back
onscreen
top
:
@
badge-offscreen-offset
;
left
:
0
;
width
:
100
%
;
height
:
100
%
;
}
//
Counter
&
:
after
{
position
:
absolute
;
display
:
inline-block
;
cursor
:
pointer
;
//
Bring
it
back
onscreen
top
:
@
badge-offscreen-offset
+
9
px
;
left
:
55
%
;
font-size
:
0.9
em
;
font-weight
:
bold
;
padding
:
0
0.3
em
;
border
:
1
px
solid
#fff
;
border-radius
:
2
px
;
background-color
:
@
badge-counter-background-seen
;
content
:
attr
(
data
-
counter
-
text
);
color
:
#fff
;
}
&
.
mw-echo-notifications-badge-long-label
{
margin-right
:
0.5
em
;
&:after
{
left
:
35
%
;
}
}
&
.
mw-echo-notifications-badge-all-read
{
opacity
:
0.625
;
&:after
{
visibility
:
hidden
;
}
}
}
#
pt-notifications-alert
&
{
&:before
{
/* @embed */
background-image
:
url
(
../icons/bell.svg
);
}
}
#
pt-notifications-notice
&
{
&:before
{
/* @embed */
background-image
:
url
(
../icons/tray.svg
);
}
}
}
/* stylelint-enable no-descending-specificity */
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5736066
Default Alt Text
mw.echo.badge.less (2 KB)
Attached To
Mode
T186553: Notification badges in personal bar need visual focus feedback
Attached
Detach File
Event Timeline
Log In to Comment