Skip to content

Commit 18c8f90

Browse files
committed
CrateRow: Use fluid space scale
1 parent 8a6b365 commit 18c8f90

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

app/components/crate-row.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
</div>
2525
<div local-class='stats'>
2626
<div local-class='downloads' data-test-downloads>
27-
{{svg-jar "download"}}
27+
{{svg-jar "download" local-class="download-icon"}}
2828
<span><abbr title="Total number of downloads">All-Time:</abbr> {{ format-num @crate.downloads }}</span>
2929
</div>
3030
<div local-class="recent-downloads" data-test-recent-downloads>
31-
{{svg-jar "download"}}
31+
{{svg-jar "download" local-class="download-icon"}}
3232
<span><abbr title="Downloads in the last 90 days">Recent:</abbr> {{ format-num @crate.recent_downloads }}</span>
3333
</div>
3434
<div local-class="updated-at" >

app/components/crate-row.module.css

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33

44
display: flex;
55
flex-wrap: wrap;
6-
padding: 15px 25px;
6+
padding: var(--space-s-m) var(--space-m-l);
77
background-color: white;
8-
border-radius: 5px;
8+
border-radius: var(--space-3xs);
99
box-shadow: var(--shadow);
1010
}
1111

1212
.description-box {
13-
padding-top: 5px;
1413
display: flex;
1514
flex-direction: column;
1615
width: 70%;
@@ -25,12 +24,12 @@
2524
}
2625

2726
.version {
28-
margin-left: 10px;
27+
margin-left: var(--space-2xs);
2928
}
3029

3130
.copy-button {
3231
composes: button-reset from '../styles/shared/buttons.module.css';
33-
padding: 1px 6px;
32+
padding: 0 var(--space-2xs);
3433
color: var(--main-color);
3534
cursor: pointer;
3635
opacity: 0;
@@ -54,18 +53,35 @@
5453

5554
.description {
5655
composes: small from '../styles/shared/typography.module.css';
57-
margin-top: 8px;
56+
margin-top: var(--space-xs);
57+
line-height: 1.5;
5858
}
5959

6060
.stats {
6161
width: 30%;
6262
color: var(--main-color-light);
63+
64+
> * + * {
65+
margin-top: var(--space-xs);
66+
}
67+
68+
svg {
69+
height: 1em;
70+
width: 1em;
71+
margin-right: var(--space-xs);
72+
73+
&.download-icon {
74+
height: calc(1em + 20px);
75+
width: calc(1em + 20px);
76+
margin: -10px;
77+
margin-right: calc(var(--space-xs) - 10px);
78+
}
79+
}
6380
}
6481

6582
.downloads {
6683
display: flex;
6784
align-items: center;
68-
padding-bottom: 5px;
6985
}
7086

7187
.recent-downloads {
@@ -74,13 +90,8 @@
7490
}
7591

7692
.updated-at {
77-
padding-top: 5px;
7893
display: flex;
7994
align-items: center;
80-
81-
svg {
82-
padding: 10px;
83-
}
8495
}
8596

8697
ul.quick-links {
@@ -90,15 +101,10 @@ ul.quick-links {
90101

91102
font-size: 80%;
92103
list-style-type: none;
93-
margin: 1em 0 0 0;
104+
margin: var(--space-xs) 0 0 0;
94105
padding: 0;
95106

96-
97-
li {
98-
margin-right: 1em;
99-
100-
&:last-child {
101-
margin-right: 0;
102-
}
107+
> * + * {
108+
margin-left: var(--space-xs);
103109
}
104110
}

0 commit comments

Comments
 (0)