Skip to content

Commit

Permalink
chore: css structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jer3m01 committed Oct 10, 2024
1 parent f9e8641 commit 864c155
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 0 deletions.
Empty file.
1 change: 1 addition & 0 deletions src/client/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ParentProps, createEffect, onMount } from "solid-js";
import { useSolidBaseContext } from "../context";
import { CurrentPageDataContext, useCurrentPageData } from "../page-data";
import {getTheme, setTheme} from "../theme";
import styles from "./Layout.module.css";

export default function Layout(props: ParentProps) {
const { Header, TableOfContent } = useSolidBaseContext().components;
Expand Down
6 changes: 6 additions & 0 deletions src/client/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "./reset.css";
@import "./variables.css";

html {
background: var(--background-color);
}
1 change: 1 addition & 0 deletions src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { FileRoutes } from "@solidjs/start/router";
import { type JSX, Show, Suspense, children } from "solid-js";
import {Dynamic} from "solid-js/web";
import { SolidBaseProvider, useSolidBaseContext } from "./context";
import "./index.css";

interface SolidBaseAppProps {
root?: BaseRouterProps["root"];
Expand Down
34 changes: 34 additions & 0 deletions src/client/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/

*, *::before, *::after {
box-sizing: border-box;
}

* {
margin: 0;
}

body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}

input, button, textarea, select {
font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}

#root, #__next {
isolation: isolate;
}
7 changes: 7 additions & 0 deletions src/client/variables.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
html {
--background-color: #ffffff;
}

html[data-theme="dark"] {
--background-color: #18181b;
}

0 comments on commit 864c155

Please sign in to comment.