Skip to content

Commit f0393d7

Browse files
author
Sophie Shepherd
committed
Delete a lot of unnecessary (i think?) CSS
1 parent e003cd0 commit f0393d7

File tree

2 files changed

+7
-20
lines changed

2 files changed

+7
-20
lines changed

modules/primer-avatars/lib/avatar-stack.scss

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
// Refactored, new avatar stack:
4848

4949
.AvatarStack {
50-
position: absolute;
51-
padding-right: 5px;
52-
background: $bg-white;
50+
background: inherit;
5351

5452
.avatar {
5553
position: relative;
@@ -80,24 +78,16 @@
8078
}
8179
// stylelint-enable selector-max-type
8280

83-
&:nth-child(3) {
84-
z-index: 1;
85-
}
86-
8781
// Account for 4+ avatars
8882
&:nth-child(n+4) {
89-
z-index: 0;
9083
display: none;
91-
margin-left: -15px;
9284
opacity: 0;
9385
}
9486
}
9587

9688
&:hover .avatar:nth-child(n+4) {
9789
display: inline-block;
98-
margin-left: 0;
9990
opacity: 1;
100-
transition: opacity 0.1s, margin-left 0.1s;
10191
}
10292

10393
&:hover .avatar {
@@ -106,25 +96,18 @@
10696
}
10797

10898
.avatar.avatar-more {
99+
z-index: 1;
109100
margin-right: 0;
110101
background: $gray-100;
111102

112-
&::before,
113103
&::after {
114-
position: absolute;
115104
display: block;
116105
height: 20px;
117106
content: "";
118107
border-radius: 2px;
119108
outline: $border-width $border-style $white;
120109
}
121110

122-
&::before {
123-
z-index: 2;
124-
width: 14px;
125-
background: $gray-300;
126-
}
127-
128111
&::after {
129112
width: 17px;
130113
background: $gray-200;

modules/primer-avatars/stories.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ storiesOf('Avatars', module)
2828
))
2929
.add('AvatarStack', () => (
3030
<div>
31-
<div className='AvatarStack tooltipped tooltipped-se temp-tooltipped-align-left' aria-label='califa, sophshep, jonrohan, and broccolini'>
31+
<div className='AvatarStack tooltipped tooltipped-se temp-tooltipped-align-left' aria-label='five avatars'>
3232
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
3333
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
3434
<div className='avatar-more avatar'></div>
3535
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
3636
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
3737
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
3838
</div>
39+
<div className='AvatarStack tooltipped tooltipped-se temp-tooltipped-align-left' aria-label='two avatars'>
40+
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
41+
<img className='avatar' alt='Uncle Cat' width='20' height='20' src='https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png'/>
42+
</div>
3943
</div>
4044
))
4145
.add('CircleBadge--small', () => (

0 commit comments

Comments
 (0)