@hazae41/labase 1.0.2

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 (2) hide show
  1. package/README.md +162 -0
  2. package/package.json +41 -0
package/README.md ADDED
@@ -0,0 +1,162 @@
1
+ # LaBase
2
+
3
+ The Tailwind framework for monochrome apps
4
+
5
+ ```bash
6
+ npm i @hazae41/labase
7
+ ```
8
+
9
+ [**Node Package 📦**](https://www.npmjs.com/package/@hazae41/labase)
10
+
11
+ ## Features
12
+ - 100% CSS
13
+ - Made for Tailwind 4.0
14
+ - Easy setup
15
+
16
+ ## Setup
17
+
18
+ ```css
19
+ @import "../node_modules/@hazae41/labase/index.css";
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ ### Text
25
+
26
+ You can use `text-default` for a black text in light mode and a white text in dark mode
27
+
28
+ ```tsx
29
+ function Example() {
30
+ return <div className="text-default">
31
+ This text will be black in light mode and white in dark mode
32
+ </div>
33
+ }
34
+ ```
35
+
36
+ And you can use `text-opposite` for a white text in light mode and a black text in dark mode
37
+
38
+ ```tsx
39
+ function Example() {
40
+ return <div className="text-opposite">
41
+ This text will be white in light mode and black in dark mode
42
+ </div>
43
+ }
44
+ ```
45
+
46
+ You also have `text-default-contrast` and `text-opposite-contrast` for the same color but with less opacity (e.g. secondary text)
47
+
48
+ ### Background
49
+
50
+ You can use `bg-default` for a white background in light mode and a black background in dark mode
51
+
52
+ ```tsx
53
+ function Example() {
54
+ return <div className="bg-default">
55
+ This div will be white in light mode and black in dark mode
56
+ </div>
57
+ }
58
+ ```
59
+
60
+ And you can use `bg-opposite` for a black background in light mode and a white background in dark mode
61
+
62
+ ```tsx
63
+ function Example() {
64
+ return <div className="bg-opposite">
65
+ This div will be black in light mode and white in dark mode
66
+ </div>
67
+ }
68
+ ```
69
+
70
+ You have `bg-default-contrast` and `bg-opposite-contrast` for low opacity (e.g. div inside div)
71
+
72
+ ```tsx
73
+ function Example() {
74
+ return <div className="bg-default-contrast">
75
+ This div will contrast with its parent
76
+ </div>
77
+ }
78
+ ```
79
+
80
+ And you have `bg-default-double-contrast` and `bg-opposite-double-contrast` for high opacity (e.g. effect on already contrasted background)
81
+
82
+ ```tsx
83
+ function Example() {
84
+ return <div className="bg-default-contrast hover:bg-default-double-contrast">
85
+ This div will contrast with its parent and contrast again on hover
86
+ </div>
87
+ }
88
+ ```
89
+
90
+ ### Border
91
+
92
+ You can use `border-default` and `border-opposite`
93
+
94
+ ```tsx
95
+ function Example() {
96
+ return <div className="border-default">
97
+ This div will have a black border in light mode and a white border in dark mode
98
+ </div>
99
+ }
100
+ ```
101
+
102
+ Along with `border-default-contrast` and `border-opposite-contrast`
103
+
104
+ ```tsx
105
+ function Example() {
106
+ return <div className="border-default-contrast">
107
+ This div will contrast with its parent
108
+ </div>
109
+ }
110
+ ```
111
+
112
+ On every side
113
+
114
+ ```tsx
115
+ function Example() {
116
+ return <div className="border-x-contrast">
117
+ This div will only have a border on the left and on the right
118
+ </div>
119
+ }
120
+ ```
121
+
122
+ ### Divide and outline
123
+
124
+ They both have the same classes as `border-*` without the side-specific ones
125
+
126
+ ### Safe padding and margin
127
+
128
+ You can use `p-safe` and `m-safe` and their side-specific variants
129
+
130
+ ```tsx
131
+ function Example() {
132
+ return <main className="p-safe">
133
+ This will avoid browser interface
134
+ </div>
135
+ }
136
+ ```
137
+
138
+ This will use the `safe-area-inset-*` value
139
+
140
+ ### Oblong padding and margin
141
+
142
+ You can use oblong padding or margin to have more padding or margin on the x-axis than on the y-axis
143
+
144
+ ```tsx
145
+ function Example() {
146
+ return <main className="po-4">
147
+ This will have px-8 and py-4
148
+ </div>
149
+ }
150
+ ```
151
+
152
+ ### Scrollbars
153
+
154
+ You can use `scrollbar-default` and `scrollbar-opposite` to style scrollbars
155
+
156
+ ```tsx
157
+ function Example() {
158
+ return <main className="bg-opposite text-opposite scrollbar-opposite h-[200px] overflow-auto">
159
+ This div will have everything opposite-colored
160
+ </div>
161
+ }
162
+ ```
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "type": "module",
3
+ "name": "@hazae41/labase",
4
+ "version": "1.0.2",
5
+ "description": "The Tailwind framework for monochrome apps",
6
+ "homepage": "https://github.com/hazae41/labase",
7
+ "repository": "github:hazae41/labase",
8
+ "author": "hazae41",
9
+ "license": "MIT",
10
+ "main": "./dist/cjs/index.cjs",
11
+ "module": "./dist/esm/index.mjs",
12
+ "types": "./dist/types/index.d.ts",
13
+ "sideEffects": false,
14
+ "files": [
15
+ "./dist/esm",
16
+ "./dist/cjs",
17
+ "./dist/types"
18
+ ],
19
+ "scripts": {
20
+ "build": "rimraf ./dist && cp -r ./src ./dist",
21
+ "prepare": "npm run build"
22
+ },
23
+ "devDependencies": {
24
+ "@hazae41/rimraf": "^1.0.1"
25
+ },
26
+ "exports": {
27
+ ".": {
28
+ "types": "./dist/types/index.d.ts",
29
+ "import": "./dist/esm/index.mjs",
30
+ "require": "./dist/cjs/index.cjs"
31
+ }
32
+ },
33
+ "keywords": [
34
+ "monochrome",
35
+ "css",
36
+ "framework",
37
+ "tailwind",
38
+ "design",
39
+ "style"
40
+ ]
41
+ }