Skip to content

Commit e45c02a

Browse files
author
Eva Decker
authored
fix: Brand Assets button styles (#250)
1 parent 6726295 commit e45c02a

4 files changed

Lines changed: 22 additions & 84 deletions

File tree

src/pages/brand-assets/_components/BrandAssetCard.astro

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ const { assetName, name, instructions, inverted } = Astro.props;
1919
<h3>{name}</h3>
2020
<p>{instructions}</p>
2121
<div class="buttons">
22-
<a class="button" href={`/assets/brand-assets/${assetName}.svg`} download
23-
><RiDownloadLine />SVG</a
22+
<a
23+
class="button secondary small"
24+
href={`/assets/brand-assets/${assetName}.svg`}
25+
download><RiDownloadLine />SVG</a
2426
>
25-
<a class="button" href={`/assets/brand-assets/${assetName}.png`} download
26-
><RiDownloadLine />PNG</a
27+
<a
28+
class="button secondary small"
29+
href={`/assets/brand-assets/${assetName}.png`}
30+
download><RiDownloadLine />PNG</a
2731
>
2832
</div>
2933
</div>
@@ -66,25 +70,5 @@ const { assetName, name, instructions, inverted } = Astro.props;
6670

6771
.button {
6872
display: inline-flex;
69-
font-size: var(--step--1);
70-
align-items: center;
71-
gap: var(--space-2xs);
72-
border: 3px solid var(--text);
73-
padding: var(--space-2xs) var(--space-xs);
74-
text-decoration: none;
75-
font-weight: 600;
76-
border-radius: 3px;
77-
78-
@media (hover: hover) {
79-
&:hover {
80-
background-color: var(--text);
81-
color: var(--bg);
82-
}
83-
}
84-
85-
&:focus-visible {
86-
outline: 3px solid var(--text);
87-
outline-offset: 2px;
88-
}
8973
}
9074
</style>

src/pages/brand-assets/_components/Swatches.astro

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ import { colors } from "~/data/colors";
1717
</div>
1818
<div class="buttons">
1919
<button
20-
class="button swatch-toggle"
20+
class="button secondary small swatch-toggle"
2121
data-name={color.id}
2222
data-color={color.hex}
2323
title={`Use ${color.name} for site background`}
2424
>
2525
Set bg
2626
</button>
2727
<button
28-
class="button copy-hex"
28+
class="button secondary small copy-hex"
2929
data-clipboard-text={color.hex}
3030
title={`Copy ${color.name} hex code`}
3131
>
@@ -112,29 +112,6 @@ import { colors } from "~/data/colors";
112112
}
113113

114114
.button {
115-
background-color: transparent;
116115
display: inline-flex;
117-
align-items: center;
118-
color: var(--text);
119-
font-size: var(--step--1);
120-
gap: var(--space-xs);
121-
border: 3px solid var(--text);
122-
padding: var(--space-2xs) var(--space-s);
123-
text-decoration: none;
124-
font-weight: 600;
125-
border-radius: 3px;
126-
cursor: pointer;
127-
128-
@media (hover: hover) {
129-
&:hover {
130-
background-color: var(--text);
131-
color: var(--bg);
132-
}
133-
}
134-
135-
&:focus-visible {
136-
outline: 3px solid var(--text);
137-
outline-offset: 2px;
138-
}
139116
}
140117
</style>

src/pages/brand-assets/index.astro

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ import Swatches from "./_components/Swatches.astro";
4545
inverted
4646
/>
4747
</div>
48-
<a class="button" href="/assets/brand-assets/namesake-logos.zip" download
49-
><RiDownloadLine />Download All</a
48+
<a
49+
class="button secondary"
50+
href="/assets/brand-assets/namesake-logos.zip"
51+
download><RiDownloadLine />Download All</a
5052
>
5153
</section>
5254
<section>
@@ -58,8 +60,10 @@ import Swatches from "./_components/Swatches.astro";
5860
>Yann Le Coroller</a
5961
> and is freely distributed. It emulates the look of printed text.
6062
</p>
61-
<a class="button" href="/assets/brand-assets/alte-haas-grotesk.zip" download
62-
><RiDownloadLine />Download Alte Haas Grotesk</a
63+
<a
64+
class="button secondary"
65+
href="/assets/brand-assets/alte-haas-grotesk.zip"
66+
download><RiDownloadLine />Download Alte Haas Grotesk</a
6367
>
6468
</section>
6569
<section>
@@ -102,22 +106,7 @@ import Swatches from "./_components/Swatches.astro";
102106

103107
.button {
104108
display: inline-flex;
105-
gap: var(--space-s);
106-
font-weight: 600;
107-
background-color: var(--text);
108-
border: 3px solid var(--text);
109-
border-radius: 3px;
110-
color: var(--bg);
111-
text-decoration: none;
112-
padding: var(--space-s) var(--space-m);
113109
margin-top: var(--space-m);
114-
cursor: pointer;
115-
116-
@media (hover: hover) {
117-
&:hover {
118-
background-color: var(--bg);
119-
color: var(--text);
120-
}
121-
}
110+
padding-inline: var(--space-m);
122111
}
123112
</style>

src/styles/base.css

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ img {
162162
border-radius: 5px;
163163
font-weight: 600;
164164
text-decoration: none;
165-
height: var(--space-3xl);
166165
gap: var(--space-xs);
167166
border: 3px solid transparent;
167+
cursor: pointer;
168168

169169
&.primary {
170170
background-color: var(--text);
@@ -192,21 +192,9 @@ img {
192192
}
193193
}
194194

195-
&.ghost {
196-
background-color: transparent;
197-
color: var(--text);
198-
border-color: transparent;
199-
200-
@media (hover: hover) {
201-
&:hover {
202-
border-color: var(--text);
203-
}
204-
}
205-
}
206-
207195
&.small {
208-
padding: var(--space-xs) var(--space-s);
209-
height: var(--space-2xl);
196+
padding: var(--space-2xs) var(--space-xs);
197+
gap: var(--space-2xs);
210198
font-size: var(--step--1);
211199
}
212200

0 commit comments

Comments
 (0)