Skip to content

Commit

Permalink
Better to implement dark page this way
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmichaelwest committed Jun 4, 2023
1 parent 1d8cd58 commit 5db9dfe
Show file tree
Hide file tree
Showing 3 changed files with 3,988 additions and 11 deletions.
10 changes: 0 additions & 10 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ import Header from './Header'

const Layout = ({ children }) => (
<>
<style jsx global>{`
body {
background-color: white;
}
@media (prefers-color-scheme: dark) {
body {
background-color: black;
}
}
`}</style>
<Head>
<link rel="icon" href="/favicon.ico" />
<link rel="me" href="https://mastodon.social/@michaelwest" />
Expand Down
14 changes: 13 additions & 1 deletion styles/global.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
@import url('https://use.typekit.net/wok1tda.css');
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;

@media (prefers-color-scheme: light) {
html, body {
background-color: #FFF;
}
}

@media (prefers-color-scheme: dark) {
html, body {
background-color: #000;
}
}

1 comment on commit 5db9dfe

@vercel
Copy link

@vercel vercel bot commented on 5db9dfe Jun 4, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.