@hazae41/labase 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +19 -1
  2. package/package.json +1 -1
  3. package/src/index.css +11 -1
package/README.md CHANGED
@@ -177,4 +177,22 @@ You can use animations such as
177
177
 
178
178
  - `animate-scale-xywh-in` and `animate-scale-xywh-out`
179
179
 
180
- - `animate-vibrate-loop`
180
+ - `animate-vibrate-loop`
181
+
182
+ ### Dark mode
183
+
184
+ Dark mode is automatic based on system, but you can also force it on a subtree with `data-theme="dark"`
185
+
186
+ ```tsx
187
+ function Example() {
188
+ return <main className="">
189
+ <div className="bg-default">
190
+ This will depend on the system
191
+ </div>
192
+ <div className="bg-default"
193
+ data-theme="dark">
194
+ This will always be dark
195
+ </div>
196
+ </div>
197
+ }
198
+ ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@hazae41/labase",
4
- "version": "1.0.6",
4
+ "version": "1.0.8",
5
5
  "description": "The Tailwind framework for monochrome apps",
6
6
  "homepage": "https://github.com/hazae41/labase",
7
7
  "repository": "github:hazae41/labase",
package/src/index.css CHANGED
@@ -10,6 +10,16 @@
10
10
  @import "./divide/index.css";
11
11
  @import "./scrollbar/index.css";
12
12
 
13
+ @custom-variant dark {
14
+ @media (prefers-color-scheme: dark) {
15
+ @slot;
16
+ }
17
+
18
+ &:where([data-theme=dark], [data-theme=dark] *) {
19
+ @slot;
20
+ }
21
+ }
22
+
13
23
  html,
14
24
  body {
15
25
  font-size: 16px;
@@ -24,7 +34,7 @@ html {
24
34
  }
25
35
 
26
36
  body {
27
- @apply h-full w-full text-base text-default bg-default overflow-hidden;
37
+ @apply h-full w-full text-base text-default bg-default scrollbar-default overflow-hidden;
28
38
  }
29
39
 
30
40
  #__next {