tailwind-clamp 4.3.1 → 4.5.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 CHANGED
@@ -1,6 +1,8 @@
1
- # [Tailwind clamp 🗜️](https://nicolas-cusan.github.io/tailwind-clamp/)
1
+ # [Tailwind clamp](https://nicolas-cusan.github.io/tailwind-clamp/)
2
2
 
3
- Leverage the the CSS `clamp` function in your [Tailwind CSS](https://tailwindcss.com/) project.
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
 
@@ -19,7 +21,7 @@ The current version of the plugin is designed to be used with Tailwind version 4
19
21
 
20
22
  ## Installation
21
23
 
22
- Install the plugin from npm:
24
+ Install the plugin from [npm](https://www.npmjs.com/package/tailwind-clamp):
23
25
 
24
26
  ```sh
25
27
  npm i tailwind-clamp
@@ -81,6 +83,18 @@ clamp-[<property>,<start>,<end>,[minSize,maxSize]]
81
83
  </div>
82
84
  ```
83
85
 
86
+ ### Using a custom `maxSize` with the default `minSize`
87
+
88
+ If you only want to override `maxSize` while keeping the default `minSize`, you can leave the fourth argument empty:
89
+
90
+ ```html
91
+ <div class="clamp-[p,2,4,,md]">
92
+ Padding scales from the default minSize (375px) up to the `md` breakpoint.
93
+ </div>
94
+ ```
95
+
96
+ This is equivalent to writing `clamp-[p,2,4,23.4375rem,md]` but saves you from having to remember the default value.
97
+
84
98
  ### Note on spacing and sizing properties
85
99
 
86
100
  All spacing and sizing properties (`p`, `m`, `w`, etc.) accept unitless numbers and .5 floating numbers that will get multiplied by the `--spacing` variable, analog to how Tailwind CSS handles spacing values.
@@ -172,29 +186,33 @@ Or in custom CSS:
172
186
 
173
187
  ## Supported properties
174
188
 
175
- - `p` including `pt`, `pb`, `pl`, `pr`, `px`, `py`, `ps`, `pe`.
176
- - `m` including `mt`, `mb`, `ml`, `mr`, `mx`, `my`, `ms`, `me`.
177
- - `inset` including `inset-x`, `inset-y`.
189
+ - `p` including `pt`, `pb`, `pl`, `pr`, `px`, `py`, `ps`, `pe`, `pbs`, `pbe`.
190
+ - `m` including `mt`, `mb`, `ml`, `mr`, `mx`, `my`, `ms`, `me`, `mbs`, `mbe`.
191
+ - `space-x` and `space-y`
192
+ - `inset` including `inset-x`, `inset-y`, `inset-bs`, `inset-be`.
178
193
  - `top`
179
194
  - `left` and `start`.
180
195
  - `right` and `end`.
181
196
  - `bottom`
182
197
  - `text` including `font-size`, `line-height` and `letter-spacing` if defined.
183
198
  - `gap` including `gap-x`, `gap-y`.
184
- - `w`
185
- - `h`
199
+ - `w` and `inline`
200
+ - `h` and `block`
186
201
  - `size`
187
- - `min-w` and `min-h`
188
- - `max-w` and `max-h`
202
+ - `min-w`, `min-h`, `min-inline`, `min-block`
203
+ - `max-w`, `max-h`, `max-inline`, `max-block`
204
+ - `basis`
205
+ - `indent`
189
206
  - `rounded` including `rounded-s`, `rounded-ss`, `rounded-se`, `rounded-e`, `rounded-ee`, `rounded-es`, `rounded-t`, `rounded-r`, `rounded-b`, `rounded-l`, `rounded-tl`, `rounded-tr`, `rounded-bl`, `rounded-br`.
190
207
  - `translate-x` and `translate-y`
191
208
  - `text-stroke`
192
209
  - `stroke`
193
210
  - `leading`
194
211
  - `tracking`
195
- - `border` including `border-t`, `border-b`, `border-l`, `border-r`, `border-x`, `border-y`.
196
- - `scroll-m` including `scroll-mx`, `scroll-my`, `scroll-ms`, `scroll-me`, `scroll-mt`, `scroll-mb`, `scroll-ml`, `scroll-mr`
197
- - `scroll-p` including `scroll-px`, `scroll-py`, `scroll-ps`, `scroll-pe`, `scroll-pt`, `scroll-pb`, `scroll-pl`, `scroll-pr`
212
+ - `border` including `border-t`, `border-b`, `border-l`, `border-r`, `border-x`, `border-y`, `border-s`, `border-e`, `border-bs`, `border-be`.
213
+ - `outline` and `outline-offset`
214
+ - `scroll-m` including `scroll-mx`, `scroll-my`, `scroll-ms`, `scroll-me`, `scroll-mt`, `scroll-mb`, `scroll-ml`, `scroll-mr`, `scroll-mbs`, `scroll-mbe`
215
+ - `scroll-p` including `scroll-px`, `scroll-py`, `scroll-ps`, `scroll-pe`, `scroll-pt`, `scroll-pb`, `scroll-pl`, `scroll-pr`, `scroll-pbs`, `scroll-pbe`
198
216
  - `decoration`
199
217
  - `underline-offset`
200
218
  - `--*` (CSS custom properties)