Skip to content

Commit

Permalink
Fix some button stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bchiang7 committed Apr 25, 2023
1 parent dcf5728 commit 539cef0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
8 changes: 6 additions & 2 deletions src/components/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,20 @@ const StyledNav = styled.nav`
top: 0;
left: 0;
z-index: -1;
transition: var(--transition);
@media (prefers-reduced-motion: no-preference) {
transition: var(--transition);
}
}
.logo-container {
position: relative;
z-index: 1;
svg {
fill: none;
transition: var(--transition);
user-select: none;
@media (prefers-reduced-motion: no-preference) {
transition: var(--transition);
}
polygon {
fill: var(--navy);
}
Expand Down
6 changes: 4 additions & 2 deletions src/styles/GlobalStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ const GlobalStyle = createGlobalStyle`
overflow: hidden;
z-index: -99;
&:focus,
&:active {
&:hover,
&:focus {
background-color: var(--green);
color: var(--navy);
top: 0;
Expand All @@ -380,6 +380,8 @@ const GlobalStyle = createGlobalStyle`
height: auto;
overflow: auto;
z-index: 99;
box-shadow: none;
transform: none;
}
}
Expand Down
34 changes: 15 additions & 19 deletions src/styles/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ const button = css`
font-family: var(--font-mono);
line-height: 1;
text-decoration: none;
cursor: pointer;
transition: var(--transition);
padding: 1.25rem 1.75rem;
transition: var(--transition);
&:hover,
&:focus,
&:active {
&:focus-visible {
outline: none;
box-shadow: 4px 4px 0 0 var(--green);
transform: translate(-5px, -5px);
Expand Down Expand Up @@ -45,24 +43,22 @@ const mixins = {
color: inherit;
position: relative;
transition: var(--transition);
&:hover,
&:active,
&:focus {
&:focus-visible {
color: var(--green);
outline: 0;
}
`,

inlineLink: css`
display: inline-block;
text-decoration: none;
text-decoration-skip-ink: auto;
position: relative;
transition: var(--transition);
color: var(--green);
transition: var(--transition);
&:hover,
&:focus,
&:active {
&:focus-visible {
color: var(--green);
outline: 0;
&:after {
Expand All @@ -81,8 +77,10 @@ const mixins = {
position: relative;
bottom: 0.37em;
background-color: var(--green);
transition: var(--transition);
opacity: 0.5;
@media (prefers-reduced-motion: no-preference) {
transition: var(--transition);
}
}
`,

Expand All @@ -98,11 +96,10 @@ const mixins = {
font-family: var(--font-mono);
line-height: 1;
text-decoration: none;
cursor: pointer;
transition: var(--transition);
&:hover,
&:focus,
&:active {
&:focus-visible {
outline: none;
box-shadow: 3px 3px 0 0 var(--green);
transform: translate(-4px, -4px);
Expand All @@ -122,11 +119,10 @@ const mixins = {
font-family: var(--font-mono);
line-height: 1;
text-decoration: none;
cursor: pointer;
transition: var(--transition);
&:hover,
&:focus,
&:active {
&:focus-visible {
outline: none;
box-shadow: 4px 4px 0 0 var(--green);
transform: translate(-5px, -5px);
Expand All @@ -141,7 +137,7 @@ const mixins = {
transition: var(--transition);
&:hover,
&:focus {
&:focus-visible {
box-shadow: 0 20px 30px -15px var(--navy-shadow);
}
`,
Expand Down

0 comments on commit 539cef0

Please sign in to comment.