tailwind-clamp 4.3.0 → 4.4.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/README.md +10 -4
- package/dist/index.js +438 -385
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
# [Tailwind clamp
|
|
1
|
+
# [Tailwind clamp](https://nicolas-cusan.github.io/tailwind-clamp/)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Fluid interfaces. From mobile to desktop.**
|
|
4
|
+
|
|
5
|
+
[Tailwind CSS](https://tailwindcss.com/) plugin to build responsive interfaces that scale smoothly using CSS `clamp()` without breakpoint micromanagement.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
@@ -10,6 +12,8 @@ Leverage the the CSS `clamp` function in your [Tailwind CSS](https://tailwindcss
|
|
|
10
12
|
- Supports `text` values with multiple properties (`fontSize`, `lineHeight`, `letterSpacing`). If `lineHeight` is definded as a unitless number or a `calc()` function, the resulting value is calculated and converted to the `fontSize` unit.
|
|
11
13
|
- Supports using Tailwind CSS theme values, arbitrary values or a combination.
|
|
12
14
|
- Supports container queries.
|
|
15
|
+
- Supports CSS custom properties (`--*`) as the target property, to store `clamp()` values in variables for reuse.
|
|
16
|
+
- Supports defining clamped theme variables via `@theme { --clamp-*: start, end; }`.
|
|
13
17
|
|
|
14
18
|
## Requirements
|
|
15
19
|
|
|
@@ -97,7 +101,8 @@ You can use CSS custom properties (`--*`) as the target property to store a `cla
|
|
|
97
101
|
clamp-[--variable-name,start,end]
|
|
98
102
|
```
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
> [!NOTE]
|
|
105
|
+
> Only explicit CSS lengths (`px`, `rem`, `em`) are accepted as values — theme tokens and unitless numbers are not supported for custom properties.
|
|
101
106
|
|
|
102
107
|
#### Example
|
|
103
108
|
|
|
@@ -164,7 +169,8 @@ Or in custom CSS:
|
|
|
164
169
|
}
|
|
165
170
|
```
|
|
166
171
|
|
|
167
|
-
|
|
172
|
+
> [!NOTE]
|
|
173
|
+
> Only explicit CSS lengths (`px`, `rem`, `em`) are accepted — unitless numbers and theme tokens are not supported in theme variable definitions.
|
|
168
174
|
|
|
169
175
|
## Supported properties
|
|
170
176
|
|