diff --git a/quartz/components/Darkmode.tsx b/quartz/components/Darkmode.tsx index 247aa226d..6a1610c73 100644 --- a/quartz/components/Darkmode.tsx +++ b/quartz/components/Darkmode.tsx @@ -10,38 +10,34 @@ import { classNames } from "../util/lang" const Darkmode: QuartzComponent = ({ displayClass, cfg }: QuartzComponentProps) => { return ( ) } diff --git a/quartz/components/styles/darkmode.scss b/quartz/components/styles/darkmode.scss index 30ea94466..edf4e61cf 100644 --- a/quartz/components/styles/darkmode.scss +++ b/quartz/components/styles/darkmode.scss @@ -1,14 +1,15 @@ .darkmode { + cursor: pointer; + padding: 0; position: relative; background: none; border: none; width: 20px; height: 20px; margin: 0 10px; + text-align: inherit; & svg { - cursor: pointer; - opacity: 0; position: absolute; width: 20px; height: 20px; @@ -26,7 +27,7 @@ color-scheme: light; } -:root[saved-theme="dark"] .toggle ~ label { +:root[saved-theme="dark"] .darkmode { & > #dayIcon { display: none; } @@ -35,7 +36,7 @@ } } -:root .toggle ~ label { +:root .darkmode { & > #dayIcon { display: inline; }