Skip to content

Use a fluid space scale #5370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Oct 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
88f8fcb
styles: Add Utopia space scale
Turbo87 Oct 21, 2022
0f57294
Header: Use fluid scale for search form padding
Turbo87 Oct 21, 2022
e66b109
FrontPageList: Move `margin` management into parent component
Turbo87 Oct 21, 2022
9cdd264
FrontPageList: Use fluid space scale
Turbo87 Oct 21, 2022
a10f09e
VersionList::Row: Use fluid space scale
Turbo87 Oct 21, 2022
9b68871
DependencyList::Row: Use fluid space scale
Turbo87 Oct 21, 2022
dc1a881
RevDepRow: Use fluid space scale
Turbo87 Oct 21, 2022
1c1b45b
CrateSidebar: Use fluid space scale
Turbo87 Oct 21, 2022
55c32ef
CrateSidebar: Remove obsolete `top` and `bottom` elements
Turbo87 Oct 21, 2022
33aef7a
styles: Simplify `.inner-main` padding/margins
Turbo87 Oct 21, 2022
8c19ce2
styles: Extract `--main-layout-padding` CSS variable
Turbo87 Oct 21, 2022
033855a
crate/version: Use fluid space scale
Turbo87 Oct 21, 2022
eb267d5
Footer: Use fluid space scale
Turbo87 Oct 21, 2022
2b7461d
Header: Use fluid space scale
Turbo87 Oct 21, 2022
621f81c
NavTabs: Use fluid space scale
Turbo87 Oct 21, 2022
66c5a11
Dropdown: Use fluid space scale
Turbo87 Oct 21, 2022
42fddcc
Settings::ApiTokens: Use fluid space scale
Turbo87 Oct 21, 2022
1da059c
SideMenu: Use fluid space scale
Turbo87 Oct 21, 2022
d02e410
CrateDownloadsList: Use fluid space scale
Turbo87 Oct 21, 2022
11543ca
CrateHeader: Use fluid space scale
Turbo87 Oct 21, 2022
dc6a483
CrateList: Use fluid space scale
Turbo87 Oct 21, 2022
5eeb928
CrateRow: Use fluid space scale
Turbo87 Oct 21, 2022
fa195c2
DownloadGraph: Use fluid space scale
Turbo87 Oct 21, 2022
a6f5b6f
EmailInput: Use fluid space scale
Turbo87 Oct 21, 2022
ac3d785
OwnedCrateRow: Use fluid space scale
Turbo87 Oct 21, 2022
519ba79
PageHeader: Use fluid space scale
Turbo87 Oct 21, 2022
63e7550
Pagination: Use fluid space scale
Turbo87 Oct 21, 2022
f2deada
RenderedHtml: Use fluid space scale
Turbo87 Oct 21, 2022
df9c368
SearchForm: Use fluid space scale
Turbo87 Oct 21, 2022
a21e1d0
SettingsPage: Use fluid space scale
Turbo87 Oct 21, 2022
10a6b4e
SortDropdown: Use fluid space scale
Turbo87 Oct 21, 2022
eb0ab35
StatsValue: Use fluid space scale
Turbo87 Oct 21, 2022
a09bd7c
categories: Use fluid space scale
Turbo87 Oct 23, 2022
778ed53
crate/reverse-dependencies: Use fluid space scale
Turbo87 Oct 23, 2022
17f731f
crate/settings: Use fluid space scale
Turbo87 Oct 23, 2022
64c6e22
crate/version-dependencies: Use fluid space scale
Turbo87 Oct 23, 2022
1ab5f63
crate/versions: Use fluid space scale
Turbo87 Oct 23, 2022
a59107d
keyword: Use fluid space scale
Turbo87 Oct 23, 2022
eecb616
me: Use fluid space scale
Turbo87 Oct 23, 2022
b4e86b2
settings: Use fluid space scale
Turbo87 Oct 23, 2022
f0c7c34
shared/buttons: Use fluid space scale
Turbo87 Oct 23, 2022
63a1154
application: Use fluid space scale
Turbo87 Oct 23, 2022
704b58c
catch-all: Use fluid space scale
Turbo87 Oct 23, 2022
6094055
category-slugs: Use fluid space scale
Turbo87 Oct 23, 2022
e8d1126
crates: Use fluid space scale
Turbo87 Oct 23, 2022
8859cfe
dashboard: Use fluid space scale
Turbo87 Oct 23, 2022
1642310
index: Use fluid space scale
Turbo87 Oct 23, 2022
170a5b7
keywords: Use fluid space scale
Turbo87 Oct 23, 2022
7f734a3
search: Use fluid space scale
Turbo87 Oct 23, 2022
fdbbfc8
team: Use fluid space scale
Turbo87 Oct 23, 2022
a68ecbf
user: Use fluid space scale
Turbo87 Oct 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/crate-downloads-list.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul local-class="list">
{{#each @crates as |crate|}}
<li local-class="row">
<li>
<LinkTo @route="crate" @model={{crate.id}} local-class="link">
{{ crate.name }} ({{ crate.max_version }})
{{svg-jar "download-arrow" local-class="download-icon"}}
Expand Down
11 changes: 6 additions & 5 deletions app/components/crate-downloads-list.module.css
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
.list {
list-style: none;
padding: 0;
}
margin: 0;

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

.link {
color: #525252;
background-color: #edebdd;
font-size: 90%;
padding: 20px 10px;
padding: var(--space-s) var(--space-xs);
display: flex;
align-items: center;
}

.download-icon {
color: #b13b89;
margin-left: auto;
margin-right: 4px;
margin-right: var(--space-3xs);
}
24 changes: 9 additions & 15 deletions app/components/crate-header.module.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
.header {
padding-top: 30px;
padding-bottom: 30px;
}

.heading {
display: flex;
align-items: baseline;
flex-wrap: wrap;
gap: 10px;
gap: var(--space-xs);
margin: 0;
padding: 0;
word-break: break-word;
Expand All @@ -18,20 +13,20 @@
}

.description {
margin-top: 15px;
margin-top: var(--space-xs);
line-height: 1.35;
}

.keywords {
list-style: none;
margin: 10px 0 0;
margin: var(--space-xs) 0 0;
padding: 0;

> li {
> * {
display: inline;

&:not(:last-child) {
margin-right: 15px;
+ * {
margin-left: var(--space-s);
}
}
}
Expand All @@ -43,22 +38,21 @@
}

.follow-button {
margin-top: 15px;
margin-top: var(--space-s);
}

.nav {
margin-bottom: 20px;
margin-bottom: var(--space-s);
}


@media only screen and (min-width: 751px) {
.header {
display: grid;
grid-template-columns: 1fr auto;
}

.follow-button {
margin: -10px -10px 0 10px;
margin: -10px -10px 0 var(--space-s);
grid-column: 2;
grid-row: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/crate-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{!-- The extra div wrapper is needed for specificity issues with `margin` --}}
<ol local-class="list">
{{#each @crates as |crate index|}}
<li local-class="row">
<li>
<CrateRow @crate={{crate}} data-test-crate-row={{index}} />
</li>
{{/each}}
Expand Down
6 changes: 2 additions & 4 deletions app/components/crate-list.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
margin: 0;
padding: 0;
list-style: none;
}

.row {
&:not(:last-child) {
margin-bottom: 15px;
> * + * {
margin-top: var(--space-s);
}
}
4 changes: 2 additions & 2 deletions app/components/crate-row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
</div>
<div local-class='stats'>
<div local-class='downloads' data-test-downloads>
{{svg-jar "download"}}
{{svg-jar "download" local-class="download-icon"}}
<span><abbr title="Total number of downloads">All-Time:</abbr> {{ format-num @crate.downloads }}</span>
</div>
<div local-class="recent-downloads" data-test-recent-downloads>
{{svg-jar "download"}}
{{svg-jar "download" local-class="download-icon"}}
<span><abbr title="Downloads in the last 90 days">Recent:</abbr> {{ format-num @crate.recent_downloads }}</span>
</div>
<div local-class="updated-at" >
Expand Down
46 changes: 26 additions & 20 deletions app/components/crate-row.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

display: flex;
flex-wrap: wrap;
padding: 15px 25px;
padding: var(--space-s-m) var(--space-m-l);
background-color: white;
border-radius: 5px;
border-radius: var(--space-3xs);
box-shadow: var(--shadow);
}

.description-box {
padding-top: 5px;
display: flex;
flex-direction: column;
width: 70%;
Expand All @@ -25,12 +24,12 @@
}

.version {
margin-left: 10px;
margin-left: var(--space-2xs);
}

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

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

.stats {
width: 30%;
color: var(--main-color-light);

> * + * {
margin-top: var(--space-xs);
}

svg {
height: 1em;
width: 1em;
margin-right: var(--space-xs);

&.download-icon {
height: calc(1em + 20px);
width: calc(1em + 20px);
margin: -10px;
margin-right: calc(var(--space-xs) - 10px);
}
}
}

.downloads {
display: flex;
align-items: center;
padding-bottom: 5px;
}

.recent-downloads {
Expand All @@ -74,13 +90,8 @@
}

.updated-at {
padding-top: 5px;
display: flex;
align-items: center;

svg {
padding: 10px;
}
}

ul.quick-links {
Expand All @@ -90,15 +101,10 @@ ul.quick-links {

font-size: 80%;
list-style-type: none;
margin: 1em 0 0 0;
margin: var(--space-xs) 0 0 0;
padding: 0;


li {
margin-right: 1em;

&:last-child {
margin-right: 0;
}
> * + * {
margin-left: var(--space-xs);
}
}
Loading