Skip to content

Commit 509cdea

Browse files
committed
Add button hover effects
1 parent fa3c5cc commit 509cdea

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

src/assets/styles/global.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ const GlobalStyle = createGlobalStyle`
109109
display: inline-flex;
110110
align-items: center;
111111
justify-content: center;
112-
/* font-size: var(--font-size__); */
113112
padding: 1rem 3rem;
114113
position: relative;
115114
overflow: hidden;
@@ -126,6 +125,25 @@ const GlobalStyle = createGlobalStyle`
126125
top: 0;
127126
left: 0;
128127
bottom: 0;
128+
transition: all .3s ease-in-out;
129+
}
130+
131+
&:hover {
132+
&::before {
133+
width: 200%;
134+
left: -5%;
135+
}
136+
}
137+
138+
span {
139+
position: relative;
140+
display: flex;
141+
align-items: center;
142+
}
143+
144+
img,
145+
svg {
146+
position: relative;
129147
}
130148
}
131149

src/components/Nav/Nav.styles.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ export const NavToggle = styled.button`
244244
text-transform: none;
245245
border: 0;
246246
margin: 0;
247-
overflow: visible;
248247
outline: none;
249248
position: relative;
250249
top: 3px;

src/pages/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ const IndexPage = () => (
3434
target="_blank"
3535
title="Join CodeHelp Discord!"
3636
>
37-
<img alt="Discord Icon" src={discordIcon} />
38-
Join CodeHelp
37+
<span>
38+
<img alt="Discord Icon" src={discordIcon} />
39+
Join CodeHelp
40+
</span>
3941
</a>
4042
</StyledHome>
4143
</Layout>

0 commit comments

Comments
 (0)