Skip to content

Commit 9ad88f8

Browse files
authored
Merge pull request #5370 from Turbo87/fluid-space-scale
Use a fluid space scale
2 parents 1ef9156 + a68ecbf commit 9ad88f8

File tree

64 files changed

+640
-629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+640
-629
lines changed

app/components/crate-downloads-list.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ul local-class="list">
22
{{#each @crates as |crate|}}
3-
<li local-class="row">
3+
<li>
44
<LinkTo @route="crate" @model={{crate.id}} local-class="link">
55
{{ crate.name }} ({{ crate.max_version }})
66
{{svg-jar "download-arrow" local-class="download-icon"}}
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
.list {
22
list-style: none;
33
padding: 0;
4-
}
4+
margin: 0;
55

6-
.row {
7-
margin: 8px 0;
6+
> * + * {
7+
margin-top: var(--space-2xs);
8+
}
89
}
910

1011
.link {
1112
color: #525252;
1213
background-color: #edebdd;
1314
font-size: 90%;
14-
padding: 20px 10px;
15+
padding: var(--space-s) var(--space-xs);
1516
display: flex;
1617
align-items: center;
1718
}
1819

1920
.download-icon {
2021
color: #b13b89;
2122
margin-left: auto;
22-
margin-right: 4px;
23+
margin-right: var(--space-3xs);
2324
}

app/components/crate-header.module.css

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
.header {
2-
padding-top: 30px;
3-
padding-bottom: 30px;
4-
}
5-
61
.heading {
72
display: flex;
83
align-items: baseline;
94
flex-wrap: wrap;
10-
gap: 10px;
5+
gap: var(--space-xs);
116
margin: 0;
127
padding: 0;
138
word-break: break-word;
@@ -18,20 +13,20 @@
1813
}
1914

2015
.description {
21-
margin-top: 15px;
16+
margin-top: var(--space-xs);
2217
line-height: 1.35;
2318
}
2419

2520
.keywords {
2621
list-style: none;
27-
margin: 10px 0 0;
22+
margin: var(--space-xs) 0 0;
2823
padding: 0;
2924

30-
> li {
25+
> * {
3126
display: inline;
3227

33-
&:not(:last-child) {
34-
margin-right: 15px;
28+
+ * {
29+
margin-left: var(--space-s);
3530
}
3631
}
3732
}
@@ -43,22 +38,21 @@
4338
}
4439

4540
.follow-button {
46-
margin-top: 15px;
41+
margin-top: var(--space-s);
4742
}
4843

4944
.nav {
50-
margin-bottom: 20px;
45+
margin-bottom: var(--space-s);
5146
}
5247

53-
5448
@media only screen and (min-width: 751px) {
5549
.header {
5650
display: grid;
5751
grid-template-columns: 1fr auto;
5852
}
5953

6054
.follow-button {
61-
margin: -10px -10px 0 10px;
55+
margin: -10px -10px 0 var(--space-s);
6256
grid-column: 2;
6357
grid-row: 1;
6458
}

app/components/crate-list.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{!-- The extra div wrapper is needed for specificity issues with `margin` --}}
33
<ol local-class="list">
44
{{#each @crates as |crate index|}}
5-
<li local-class="row">
5+
<li>
66
<CrateRow @crate={{crate}} data-test-crate-row={{index}} />
77
</li>
88
{{/each}}

app/components/crate-list.module.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
margin: 0;
33
padding: 0;
44
list-style: none;
5-
}
65

7-
.row {
8-
&:not(:last-child) {
9-
margin-bottom: 15px;
6+
> * + * {
7+
margin-top: var(--space-s);
108
}
119
}

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)