Skip to content

Commit

Permalink
fix(Theme): Forcing dark mode in the application
Browse files Browse the repository at this point in the history
  • Loading branch information
wadhia-yash committed Jul 9, 2024
1 parent 185440f commit 6db2971
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<script lang="ts">
import "../styles/main.css";
import NavMenu from "$lib/components/NavMenu.svelte";
import {onMount} from "svelte";
import { browser } from "$app/environment";
onMount(() => {
if (browser) {
window.document.documentElement.classList.add('dark')
}
})
</script>

<div class="grid h-full w-screen grid-cols-1 grid-rows-[1fr] overflow-hidden text-smd dark:text-gray-300">
Expand Down
1 change: 1 addition & 0 deletions web/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('tailwindcss').Config} */
export default {
darkMode: 'class',
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {
Expand Down

0 comments on commit 6db2971

Please sign in to comment.