@thi.ng/meta-css 0.11.3 → 0.12.0

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-04-23T07:02:18Z
3
+ - **Last updated**: 2024-04-26T13:32:20Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ## [0.12.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/meta-css@0.12.0) (2024-04-26)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add color-scheme, light-dark() and appearance rules/tpls ([5f90a48](https://github.com/thi-ng/umbrella/commit/5f90a48))
17
+
12
18
  ### [0.11.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/meta-css@0.11.1) (2024-04-20)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -50,6 +50,7 @@
50
50
  - [Border radius](#border-radius)
51
51
  - [Border width](#border-width)
52
52
  - [Box sizing](#box-sizing)
53
+ - [Color scheme](#color-scheme)
53
54
  - [Content](#content)
54
55
  - [Cursors](#cursors)
55
56
  - [Display mode](#display-mode)
@@ -91,12 +92,14 @@
91
92
  - [Z-indices](#z-indices)
92
93
  - [Templates by category](#templates-by-category)
93
94
  - [Animation / transition](#animation--transition)
95
+ - [Appearance](#appearance)
94
96
  - [Aspect ratios](#aspect-ratios)
95
97
  - [Background](#background)
96
98
  - [Background color](#background-color)
97
99
  - [Border color](#border-color)
98
100
  - [Color adjustment](#color-adjustment)
99
101
  - [Color definitions](#color-definitions)
102
+ - [Color scheme](#color-scheme)
100
103
  - [Dimensions](#dimensions)
101
104
  - [Font families](#font-families)
102
105
  - [Fx](#fx)
@@ -1111,7 +1114,7 @@ These are readily usable (and used by a growing number of example projects in
1111
1114
  this repo), but also are provided as starting point to define your own custom
1112
1115
  framework(s)...
1113
1116
 
1114
- Currently, there are 937 CSS utility classes (incl. 64 templates) defined in "MetaCSS base" (v0.9.0):
1117
+ Currently, there are 946 CSS utility classes (incl. 70 templates) defined in "MetaCSS base" (v0.12.0):
1115
1118
 
1116
1119
  ### Classes by category
1117
1120
 
@@ -1342,6 +1345,12 @@ Currently, there are 937 CSS utility classes (incl. 64 templates) defined in "Me
1342
1345
  - `border-box` (border-box)
1343
1346
  - `content-box` (content-box)
1344
1347
 
1348
+ #### Color scheme
1349
+
1350
+ - `color-scheme-dark` (dark)
1351
+ - `color-scheme-light` (light)
1352
+ - `color-scheme-light-dark` (light dark)
1353
+
1345
1354
  #### Content
1346
1355
 
1347
1356
  <details><summary>6 items:</summary>
@@ -2329,6 +2338,14 @@ Sets transition-timing-function to `steps(num)`
2329
2338
 
2330
2339
  </details>
2331
2340
 
2341
+ #### Appearance
2342
+
2343
+ ##### `appearance(mode)`
2344
+
2345
+ - **mode**: CSS value
2346
+
2347
+ Sets appearance (incl. `-webkit` prefixed version) to given value
2348
+
2332
2349
  #### Aspect ratios
2333
2350
 
2334
2351
  ##### `aspect-ratio(width, height)`
@@ -2467,6 +2484,47 @@ Defines a rgb() color variable with given name and additional derived vars for e
2467
2484
 
2468
2485
  </details>
2469
2486
 
2487
+ #### Color scheme
2488
+
2489
+ <details><summary>5 items:</summary>
2490
+
2491
+ ##### `bg-light-dark(light, dark)`
2492
+
2493
+ - **light**: variable name (without `--` prefix)
2494
+ - **dark**: variable name (without `--` prefix)
2495
+
2496
+ Sets `background-color` using CSS light-dark() function
2497
+
2498
+ ##### `border-light-dark(light, dark)`
2499
+
2500
+ - **light**: variable name (without `--` prefix)
2501
+ - **dark**: variable name (without `--` prefix)
2502
+
2503
+ Sets `border-color` using CSS light-dark() function
2504
+
2505
+ ##### `fill-light-dark(light, dark)`
2506
+
2507
+ - **light**: variable name (without `--` prefix)
2508
+ - **dark**: variable name (without `--` prefix)
2509
+
2510
+ Sets `fill` color using CSS light-dark() function
2511
+
2512
+ ##### `light-dark(light, dark)`
2513
+
2514
+ - **light**: variable name (without `--` prefix)
2515
+ - **dark**: variable name (without `--` prefix)
2516
+
2517
+ Sets `color` using CSS light-dark() function
2518
+
2519
+ ##### `stroke-light-dark(light, dark)`
2520
+
2521
+ - **light**: variable name (without `--` prefix)
2522
+ - **dark**: variable name (without `--` prefix)
2523
+
2524
+ Sets `stroke` color using CSS light-dark() function
2525
+
2526
+ </details>
2527
+
2470
2528
  #### Dimensions
2471
2529
 
2472
2530
  <details><summary>6 items:</summary>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/meta-css",
3
- "version": "0.11.3",
3
+ "version": "0.12.0",
4
4
  "description": "Data-driven CSS framework codegen, transpiler & bundler",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -110,5 +110,5 @@
110
110
  "status": "alpha",
111
111
  "year": 2023
112
112
  },
113
- "gitHead": "aed3421c21044c005fbcb7cc37965ccf85a870d2\n"
113
+ "gitHead": "0bec55821066c18eb977a7eabd42c0bb2b096d98\n"
114
114
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "info": {
3
3
  "name": "MetaCSS base",
4
- "version": "0.9.0"
4
+ "version": "0.12.0"
5
5
  },
6
6
  "media": {
7
7
  "ns": { "min-width": "640px" },
@@ -46,9 +46,20 @@
46
46
  }
47
47
  },
48
48
  "vars": {
49
+ "schemes": ["border-", "background-", ""],
49
50
  "fill-stroke": ["fill", "stroke"]
50
51
  },
51
52
  "specs": [
53
+ {
54
+ "doc": { "group": "color scheme", "desc": "<v>" },
55
+ "name": "color-scheme-<k>",
56
+ "props": "color-scheme",
57
+ "values": {
58
+ "light": "light",
59
+ "dark": "dark",
60
+ "light-dark": "light dark"
61
+ }
62
+ },
52
63
  {
53
64
  "doc": { "group": "border color", "desc": "<v>" },
54
65
  "name": "border-color-<k>",
@@ -119,6 +130,59 @@
119
130
  }
120
131
  ],
121
132
  "templates": [
133
+ {
134
+ "doc": {
135
+ "group": "color scheme",
136
+ "desc": "Sets `border-color` using CSS light-dark() function",
137
+ "args": [
138
+ "light: variable name (without `--` prefix)",
139
+ "dark: variable name (without `--` prefix)"
140
+ ]
141
+ },
142
+ "name": "border-light-dark",
143
+ "props": { "border-color": "light-dark(var(--{0}), var(--{1}))" }
144
+ },
145
+ {
146
+ "doc": {
147
+ "group": "color scheme",
148
+ "desc": "Sets `background-color` using CSS light-dark() function",
149
+ "args": [
150
+ "light: variable name (without `--` prefix)",
151
+ "dark: variable name (without `--` prefix)"
152
+ ]
153
+ },
154
+ "name": "bg-light-dark",
155
+ "props": {
156
+ "background-color": "light-dark(var(--{0}), var(--{1}))"
157
+ }
158
+ },
159
+ {
160
+ "doc": {
161
+ "group": "color scheme",
162
+ "desc": "Sets `color` using CSS light-dark() function",
163
+ "args": [
164
+ "light: variable name (without `--` prefix)",
165
+ "dark: variable name (without `--` prefix)"
166
+ ]
167
+ },
168
+ "name": "light-dark",
169
+ "props": {
170
+ "background-color": "light-dark(var(--{0}), var(--{1}))"
171
+ }
172
+ },
173
+ {
174
+ "doc": {
175
+ "group": "color scheme",
176
+ "desc": "Sets `<var>` color using CSS light-dark() function",
177
+ "args": [
178
+ "light: variable name (without `--` prefix)",
179
+ "dark: variable name (without `--` prefix)"
180
+ ]
181
+ },
182
+ "name": "<var>-light-dark",
183
+ "props": { "<var>": "light-dark(var(--{0}), var(--{1}))" },
184
+ "vars": ["fill-stroke"]
185
+ },
122
186
  {
123
187
  "doc": {
124
188
  "group": "border color",
@@ -30,6 +30,15 @@
30
30
  "doc": { "group": "layout", "args": ["num: column count"] },
31
31
  "name": "columns",
32
32
  "props": "column-count"
33
+ },
34
+ {
35
+ "doc": {
36
+ "group": "appearance",
37
+ "desc": "Sets appearance (incl. `-webkit` prefixed version) to given value",
38
+ "args": ["mode: CSS value"]
39
+ },
40
+ "name": "appearance",
41
+ "props": { "appearance": "{0}", "-webkit-appearance": "{0}" }
33
42
  }
34
43
  ]
35
44
  }