Theming
authorAdam Dullage <redacted>
Tue, 23 Apr 2024 19:16:05 +0000 (20:16 +0100)
committerAdam Dullage <redacted>
Tue, 23 Apr 2024 19:16:05 +0000 (20:16 +0100)
client/index.html
client/style.css
tailwind.config.js

index 2f015fbc09281dee518ee3103cab8fa3eeae6fdf..3f315feeb9a0ab2ddc3a2f92721ed18c36058428 100644 (file)
@@ -8,7 +8,7 @@
 
     <link href="/style.css" rel="stylesheet" />
   </head>
-  <body>
+  <body class="bg-theme-background text-theme-text">
     <div id="app"></div>
     <script type="module" src="/index.js"></script>
   </body>
index b5c61c956711f981a41e95f7fcf0038436cfbb22..b91ad0a42d9539f10a12fe7377d948e9b5c7606a 100644 (file)
@@ -1,3 +1,37 @@
 @tailwind base;
 @tailwind components;
 @tailwind utilities;
+
+@layer base {
+    body {
+        --theme-brand: 248 166 107;
+
+        --theme-background: 255 255 255;
+        --theme-background-elevated: 255 255 255;
+        --theme-background-tint: 243 244 245;
+        --theme-background-highlight: 239 243 255;
+
+        --theme-text: 44 49 57;
+        --theme-text-muted: 136 145 161;
+        --theme-text-very-muted: 193 199 208;
+
+        --theme-shadow: 236 238 240;
+        --theme-border: 236 238 240;
+    }
+
+    body.dark-theme {
+        /* --theme-brand: 248 166 107; */
+
+        --theme-background: 34 38 44;
+        --theme-background-elevated: 44 49 57;
+        --theme-background-tint: 34 38 44;
+        --theme-background-highlight: 136 145 161;
+
+        --theme-text: 193 199 208;
+        --theme-text-muted: 136 145 161;
+        --theme-text-very-muted: 94 107 128;
+
+        --theme-shadow: none;
+        --theme-border: 94 107 128;
+    }
+}
\ No newline at end of file
index 48289ca546be61b8c0c9186657f489f280fbd12a..9a715f4d705c3365788728e650c299ad51aad7b8 100644 (file)
@@ -1,8 +1,22 @@
 /** @type {import('tailwindcss').Config} */
+
 module.exports = {
   content: ["client/**/*.{html,js,vue}"],
   theme: {
-    extend: {},
+    extend: {
+      colors: {
+        "theme-brand": "rgb(var(--theme-brand) / <alpha-value>)",
+        "theme-background": "rgb(var(--theme-background) / <alpha-value>)",
+        "theme-background-elevated": "rgb(var(--theme-background-elevated) / <alpha-value>)",
+        "theme-background-tint": "rgb(var(--theme-background-tint) / <alpha-value>)",
+        "theme-background-highlight": "rgb(var(--theme-background-highlight) / <alpha-value>)",
+        "theme-text": "rgb(var(--theme-text) / <alpha-value>)",
+        "theme-text-muted": "rgb(var(--theme-text-muted) / <alpha-value>)",
+        "theme-text-very-muted": "rgb(var(--theme-text-very-muted) / <alpha-value>)",
+        "theme-shadow": "rgb(var(--theme-shadow) / <alpha-value>)",
+        "theme-border": "rgb(var(--theme-border) / <alpha-value>)",
+      },
+    },
   },
   plugins: [],
 };
git clone https://git.99rst.org/PROJECT