Skip to content

Commit 35d7c23

Browse files
committed
Auto merge of #4171 - Turbo87:shadows, r=locks
Improve Avatar styling This PR improves the styling of the avatars in the crate owners list and the versions list. It adds a small border and drop shadow to give them a little more depth, and it also changes user avatars to circles (vs teams, which stay rectangular), similar to how GitHub does it these days. ### Before <img width="317" alt="Bildschirmfoto 2021-11-12 um 17 40 01" src="https://user-images.githubusercontent.com/141300/141502713-4e1a2197-7c2e-4a8f-8dde-3bf99c77b423.png"> <img width="266" alt="Bildschirmfoto 2021-11-12 um 17 40 09" src="https://user-images.githubusercontent.com/141300/141502714-012e41db-f5d3-4b8e-b12e-d39dbbc7d805.png"> ### After <img width="306" alt="Bildschirmfoto 2021-11-12 um 17 39 50" src="https://user-images.githubusercontent.com/141300/141502708-06897721-3fdb-4c78-8cd2-ffd801220bb9.png"> <img width="317" alt="Bildschirmfoto 2021-11-12 um 17 39 39" src="https://user-images.githubusercontent.com/141300/141502702-e6613d3c-8148-4f6c-869d-522fc5cef5fd.png">
2 parents a54c194 + a2dc563 commit 35d7c23

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

app/components/owners-list.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
data-test-owners
55
>
66
{{#each @owners as |owner|}}
7-
<li>
7+
<li local-class="{{if (eq owner.kind "team") "team"}}">
88
<LinkTo
99
@route={{owner.kind}}
1010
@model={{owner.login}}

app/components/owners-list.module.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,12 @@
4141
}
4242

4343
.avatar {
44-
border-radius: 4px;
44+
border-radius: 50%;
45+
background: white;
46+
box-shadow: 1px 2px 2px 0 hsla(51, 50%, 44%, .35);
47+
padding: 1px;
48+
49+
.team & {
50+
border-radius: 4px;
51+
}
4552
}

app/components/version-list/row.module.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@
153153
width: auto;
154154
margin-left: 3px;
155155
margin-bottom: -.4em;
156-
border-radius: 3px;
156+
border-radius: 50%;
157+
box-shadow: 0 1px 1px 0 var(--grey600);
158+
padding: 1px;
157159
}
158160

159161
.metadata-row {

0 commit comments

Comments
 (0)