@css-hooks/qwik 4.0.0-next.52 → 4.0.0-next.53

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 +42 -40
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,31 +1,32 @@
1
1
  <div align="center">
2
- <a id="logomark" href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.52/.github/logomark.svg" height="128" /></a><br/><br/>
2
+ <a id="logomark" href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.53/.github/logomark.svg" height="128" /></a><br/><br/>
3
3
  <div id="wordmark">
4
- <a href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.52/.github/wordmark-dark.svg" width="256"></a>
4
+ <a href="https://next.css-hooks.com"><img alt="CSS Hooks" src="https://github.com/css-hooks/css-hooks/raw/v4.0.0-next.53/.github/wordmark-dark.svg" width="256"></a>
5
5
  </div>
6
6
  </div>
7
7
 
8
8
  <br/>
9
9
 
10
10
  <div align="center" id="badges">
11
- <a href="https://github.com/css-hooks/css-hooks/tree/v4.0.0-next.52"><img src="https://img.shields.io/badge/tag-v4.0.0--next.52-ffd700" alt="tag v4.0.0-next.52"></a>
12
- <a href="https://www.npmjs.com/package/@css-hooks/qwik/v/4.0.0-next.52"><img src="https://img.shields.io/badge/npm-v4.0.0--next.52-ffd700" alt="npm version"></a>
13
- <a href="https://github.com/css-hooks/css-hooks/blob/v4.0.0-next.52/LICENSE"><img src="https://img.shields.io/badge/license-MIT-ffd700" alt="license"></a>
11
+ <a href="https://github.com/css-hooks/css-hooks/tree/v4.0.0-next.53"><img src="https://img.shields.io/badge/tag-v4.0.0--next.53-ffd700" alt="tag v4.0.0-next.53"></a>
12
+ <a href="https://www.npmjs.com/package/@css-hooks/qwik/v/4.0.0-next.53"><img src="https://img.shields.io/badge/npm-v4.0.0--next.53-ffd700" alt="npm version"></a>
13
+ <a href="https://github.com/css-hooks/css-hooks/blob/v4.0.0-next.53/LICENSE"><img src="https://img.shields.io/badge/license-MIT-ffd700" alt="license"></a>
14
14
  </div>
15
15
 
16
16
  ---
17
17
 
18
18
  ## Overview
19
19
 
20
- Hooks add CSS features to native inline styles, enabling you to apply styles
21
- conditionally based on pseudo-classes, custom selectors, media queries, and
22
- more—all without leaving the `style` prop. By exploiting the hidden
20
+ **CSS power. Inline style simplicity.**
21
+
22
+ Respond to user interaction, layout context, and inherited state. All
23
+ CSS-driven. All without leaving the `style` prop. By exploiting the hidden
23
24
  programmability of CSS Variables, CSS Hooks delivers a flexible CSS-in-JS
24
25
  experience without runtime style injection or build steps.
25
26
 
26
27
  ## Feature highlights
27
28
 
28
- ### Pseudo-classes
29
+ ### User interaction
29
30
 
30
31
  ```jsx
31
32
  <button
@@ -46,49 +47,50 @@ experience without runtime style injection or build steps.
46
47
  </button>
47
48
  ```
48
49
 
49
- ### Selectors
50
+ ### Layout context
50
51
 
51
52
  ```jsx
52
- <label>
53
- <input type="checkbox" checked />
54
- <span
55
- style={mergeStyles(
56
- {},
57
- on(":checked + &", {
58
- textDecoration: "line-through",
59
- }),
60
- )}
61
- >
62
- Simplify CSS architecture
63
- </span>
64
- </label>
53
+ <span
54
+ style={mergeStyles(
55
+ { display: "none" },
56
+ on("@container (width >= 50px)", {
57
+ display: "revert-layer",
58
+ }),
59
+ on("@container (width >= 100px)", {
60
+ display: "none",
61
+ }),
62
+ )}
63
+ >
64
+ sm
65
+ </span>
66
+ <span
67
+ style={mergeStyles(
68
+ { display: "none" },
69
+ on("@container (width >= 100px)", {
70
+ display: "revert-layer",
71
+ }),
72
+ )}
73
+ >
74
+ lg
75
+ </span>
65
76
  ```
66
77
 
67
- ### Responsive design
78
+ ### Inherited state
68
79
 
69
80
  ```jsx
70
- <>
81
+ <div style={mergeStyles({ padding: 24 }, on("&:hover", enable("%active")))}>
82
+ Hover parent
71
83
  <span
72
84
  style={mergeStyles(
73
- {},
74
- on(not("@container (width < 400px)"), {
75
- display: "none",
85
+ { color: "gray" },
86
+ on("%active", {
87
+ color: "purple",
76
88
  }),
77
89
  )}
78
90
  >
79
- sm
91
+ Child responds
80
92
  </span>
81
- <span
82
- style={mergeStyles(
83
- {},
84
- on("@container (width < 400px)", {
85
- display: "none",
86
- }),
87
- )}
88
- >
89
- lg
90
- </span>
91
- </>
93
+ </div>
92
94
  ```
93
95
 
94
96
  ## Compatibility
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@css-hooks/qwik",
3
3
  "description": "CSS Hooks for Qwik",
4
- "version": "4.0.0-next.52",
4
+ "version": "4.0.0-next.53",
5
5
  "author": "Nick Saunders",
6
6
  "dependencies": {
7
- "@css-hooks/core": "4.0.0-next.52"
7
+ "@css-hooks/core": "4.0.0-next.53"
8
8
  },
9
9
  "devDependencies": {
10
10
  "@qwik.dev/core": "^2.0.0-beta.30",