Skip to content

Commit 388a6cf

Browse files
committed
crate-row: Adjust styles for improved alignment and spacing
1 parent f7e6529 commit 388a6cf

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

app/components/crate-row.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div local-class="crate-row" data-test-crate-row ...attributes>
22
<div local-class="description-box">
3-
<div>
3+
<div local-class="crate-spec">
44
{{#let (link "crate" @crate.id) as |l|}}
55
<a href={{l.url}} local-class="name" data-test-crate-link {{on "click" l.transitionTo}}>
66
{{@crate.name}}

app/components/crate-row.module.css

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,8 @@
2323
overflow-wrap: break-word;
2424
}
2525

26-
.version {
27-
margin-left: var(--space-2xs);
28-
}
29-
3026
.copy-button {
3127
composes: button-reset from '../styles/shared/buttons.module.css';
32-
padding: 0 var(--space-2xs);
3328
color: var(--main-color);
3429
cursor: pointer;
3530

@@ -51,14 +46,28 @@
5146
}
5247

5348
svg {
49+
vertical-align: top;
5450
height: 1rem;
5551
width: 1rem;
5652
}
5753
}
5854

55+
.crate-spec {
56+
display: flex;
57+
flex-wrap: wrap;
58+
align-items: center;
59+
60+
& > * {
61+
margin-bottom: calc(var(--space-xs) / 2);
62+
}
63+
& > :not(last-child) {
64+
margin-right: var(--space-2xs);
65+
}
66+
}
67+
5968
.description {
6069
composes: small from '../styles/shared/typography.module.css';
61-
margin-top: var(--space-xs);
70+
margin-top: calc(var(--space-xs) / 2);
6271
line-height: 1.5;
6372
}
6473

0 commit comments

Comments
 (0)