Skip to content

Commit

Permalink
fix(components-DesktopNav): add hover style to ThemeSwitch icons (#928
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sabertazimi committed Jun 21, 2022
1 parent 6d30ca0 commit 78f3c87
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions components/Header/DesktopNav.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
a.light[href],
a.dark[href] {
.light.light[class],
.dark.dark[class] {
@apply hover:text-primary focus:text-primary;
}

a.light[href] {
.light.light[class] {
@apply text-light;
}

a.dark[href] {
.dark.dark[class] {
@apply text-dark;
}
6 changes: 3 additions & 3 deletions components/Header/DesktopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ const DesktopNav = ({ fixed, posts }: Props): JSX.Element => (
key: 'theme',
label: (
<ThemeSwitch
className={cx('dark:text-light', {
'text-light': !fixed,
'text-dark': fixed,
className={cx('dark-menu-link', {
[styles.light]: !fixed,
[styles.dark]: fixed,
})}
/>
),
Expand Down
2 changes: 1 addition & 1 deletion components/Header/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ exports[`Header should render correctly (snapshot) 1`] = `
>
<span
aria-label="sun"
class="anticon dark:text-light text-light"
class="anticon dark-menu-link light"
role="img"
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion layouts/__snapshots__/Layout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ exports[`Layout should render correctly (snapshot) 1`] = `
>
<span
aria-label="sun"
class="anticon dark:text-light text-light"
class="anticon dark-menu-link light"
role="img"
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion layouts/__snapshots__/PostLayout.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ exports[`PostLayout should render correctly (snapshot) 1`] = `
>
<span
aria-label="sun"
class="anticon dark:text-light text-light"
class="anticon dark-menu-link light"
role="img"
>
<svg
Expand Down
2 changes: 1 addition & 1 deletion styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
@apply focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-secondary;
}

a.dark-menu-link[href] {
.dark-menu-link.dark-menu-link[class] {
@apply dark:text-light dark:hover:text-primary dark:focus:text-primary;
}
}
Expand Down

1 comment on commit 78f3c87

@vercel
Copy link

@vercel vercel bot commented on 78f3c87 Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog-sabertaz.vercel.app
blog.tazimi.dev
blog-git-main-sabertaz.vercel.app

Please sign in to comment.