Skip to content

Commit 73f231d

Browse files
committed
add color change on keypress for svg links; fix styles formatting
1 parent 31c6da3 commit 73f231d

1 file changed

Lines changed: 48 additions & 49 deletions

File tree

src/components/WaveFooter.astro

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -116,33 +116,27 @@ const year = new Date().getFullYear();
116116
class="flex flex-wrap items-center justify-center w-full lg:justify-start"
117117
>
118118
<div class="flex justify-center w-full lg:justify-start">
119-
<div class="social-links flex items-center pl-2 pr-2 justify-start">
119+
<div class="flex items-center pl-2 pr-2 justify-start">
120120
<a
121121
aria-label="GitHub"
122-
class="p-2"
122+
class="p-2 github-logo"
123123
href="https://github.com/shipshapecode"
124124
>
125-
<div class="github-logo">
126-
<Icon name="github" />
127-
</div>
125+
<Icon name="github" />
128126
</a>
129127
<a
130128
aria-label="Twitter"
131-
class="p-2"
129+
class="p-2 twitter-logo"
132130
href="https://twitter.com/shipshapecode"
133131
>
134-
<div class="twitter-logo">
135-
<Icon name="twitter" />
136-
</div>
132+
<Icon name="twitter" />
137133
</a>
138134
<a
139135
aria-label="LinkedIn"
140-
class="p-2"
136+
class="p-2 linkedin-logo"
141137
href="https://www.linkedin.com/company/ship-shape/"
142138
>
143-
<div class="linkedin-logo">
144-
<Icon name="linkedin" />
145-
</div>
139+
<Icon name="linkedin" />
146140
</a>
147141
</div>
148142
</div>
@@ -158,60 +152,65 @@ const year = new Date().getFullYear();
158152
<style lang="scss" is:global>
159153
.wave {
160154
@apply bg-navy pt-24;
155+
}
156+
.footer-logo {
157+
path {
158+
fill: var(--white);
159+
stroke: var(--white);
160+
stroke-width: 1.25rem;
161+
}
162+
}
161163

162-
.footer-logo {
163-
path {
164-
fill: var(--white);
165-
stroke: var(--white);
166-
stroke-width: 1.25rem;
164+
.footer-bottom {
165+
a {
166+
@apply font-bold text-white;
167+
168+
&:hover,
169+
&:focus {
170+
@apply text-red-light;
167171
}
168172
}
169173

170-
.footer-bottom {
171-
a {
172-
@apply font-bold text-white;
173-
174-
&:hover,
175-
&:focus {
176-
@apply text-red-light;
174+
.github-logo,
175+
.linkedin-logo,
176+
.twitter-logo {
177+
svg {
178+
path {
179+
@apply transition-colors;
180+
fill: var(--white);
181+
transition-duration: 0.25s;
182+
transition-property: fill;
177183
}
178184
}
179-
180-
.social-links {
185+
&:hover,
186+
&:focus {
181187
svg {
182-
path {
183-
fill: var(--white);
184-
transition-duration: 0.25s;
185-
transition-property: fill;
186-
}
187-
// this one doesn't seem to work on focus/keypress
188-
&:hover,
189188
path {
190189
fill: var(--red-light);
191190
}
192191
}
193192
}
194193
}
194+
}
195195

196-
.github-logo {
197-
svg {
198-
height: 22px;
199-
width: 23px;
200-
}
196+
.github-logo {
197+
svg {
198+
height: 22px;
199+
width: 23px;
201200
}
201+
}
202202

203-
.linkedin-logo {
204-
svg {
205-
height: 20px;
206-
width: 19px;
207-
}
203+
.linkedin-logo {
204+
svg {
205+
height: 20px;
206+
width: 19px;
208207
}
208+
}
209209

210-
.twitter-logo {
211-
svg {
212-
height: 19px;
213-
width: 23px;
214-
}
210+
.twitter-logo {
211+
svg {
212+
height: 19px;
213+
width: 23px;
215214
}
216215
}
217216
</style>

0 commit comments

Comments
 (0)