tailwind-clamp 4.0.6 → 4.0.7

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,8 +1,6 @@
1
- # Tailwind clamp 🗜️
1
+ # [Tailwind clamp 🗜️](https://nicolas-cusan.github.io/tailwind-clamp/)
2
2
 
3
- Tailwind CSS plugin to use CSS `clamp` in your project. Enabling fluid interfaces using Tailwind syntax.
4
-
5
- The plugin is based on the formula presented in this [article](https://chriskirknielsen.com/blog/modern-fluid-typography-with-clamp/)
3
+ Leverage the the CSS `clamp` function in your [Tailwind CSS](https://tailwindcss.com/) project.
6
4
 
7
5
  ## Features
8
6
 
@@ -28,7 +26,7 @@ npm i tailwind-clamp
28
26
  Add the plugin in your main CSS file:
29
27
 
30
28
  ```css
31
- @import 'tailwindcss';
29
+ @import "tailwindcss";
32
30
  @plugin "tailwind-clamp";
33
31
  ```
34
32
 
@@ -36,10 +34,10 @@ Add the plugin in your main CSS file:
36
34
 
37
35
  The plugin allows two configuration options:
38
36
 
39
- | Name | Type | Description | Default value |
40
- | ------------- | ---------- | -------------------------------------------------- | ------------- |
41
- | **`minSize`** | `{string}` | Viewport or container size where the clamp starts. | `23.4375rem` |
42
- | **`maxSize`** | `{string}` | Viewport or container size where the clamp end. | `90rem` |
37
+ | Name | Type | Description | Default value |
38
+ | ------------- | ---------- | ------------------------------------- | ------------- |
39
+ | **`minSize`** | `{string}` | Viewport size where the clamp starts. | `23.4375rem` |
40
+ | **`maxSize`** | `{string}` | Viewport size where the clamp end. | `90rem` |
43
41
 
44
42
  Value should be a css length (`px`, `rem`, `em`). The unit for both options need to match.
45
43
 
@@ -64,8 +62,8 @@ clamp-[<property>,<start>,<end>,[minSize,maxSize]]
64
62
  - **`property`** Property that the value should be applied to. See a list of all supported properties below.
65
63
  - **`start`** Value at `minSize` viewport size. It can be a key from your Tailwind CSS config file or a a css length (`px`, `rem`, `em`), the unit will need to match `end`.
66
64
  - **`end`** Value at `maxSize` viewport size. It can be a key from your Tailwind CSS config file or a css length (`px`, `rem`, `em`), the unit will need to match `start`.
67
- - **`[minSize=23.4375rem]`** Viewport or container size, where the clamp starts, defaults to `23.4375rem` (`375px`). It can be a breakpoint name from your theme or a css length (`px`, `rem`, `em`), the unit will need to match `maxSize` and be smaller than `maxSize`.
68
- - **`[maxSize=90rem]`** Viewport or container size, where the clamp stops, defaults to `90rem` (`1440px`). It can be a breakpoint name from your theme or a css length (`px`, `rem`, `em`), the unit will need to match `minSize` and be be larger than `minSize`.
65
+ - **`[minSize=23.4375rem]`** Viewport or container size, where the clamp starts, defaults to `23.4375rem` (`375px`). It can be a breakpoint or container size name from your theme or a css length (`px`, `rem`, `em`). Container size names _and values_ are prefixed with `@`. The unit will need to match `maxSize` and be smaller than `maxSize`.
66
+ - **`[maxSize=90rem]`** Viewport or container size, where the clamp stops, defaults to `90rem` (`1440px`). It can be a breakpoint or container size name from your theme or a css length (`px`, `rem`, `em`). Container size names _and values_ are prefixed with `@`. The unit will need to match `minSize` and be be larger than `minSize`.
69
67
 
70
68
  ### Examples
71
69
 
@@ -106,3 +104,13 @@ clamp-[<property>,<start>,<end>,[minSize,maxSize]]
106
104
  - `border` including `border-t`, `border-b`, `border-l`, `border-r`, `border-x`, `border-y`.
107
105
  - `scroll-m` including `scroll-mx`, `scroll-my`, `scroll-ms`, `scroll-me`, `scroll-mt`, `scroll-mb`, `scroll-ml`, `scroll-mr`
108
106
  - `scroll-p` including `scroll-px`, `scroll-py`, `scroll-ps`, `scroll-pe`, `scroll-pt`, `scroll-pb`, `scroll-pl`, `scroll-pr`
107
+
108
+ ## Credits & mentions
109
+
110
+ The plugin is based on the formula presented in this [article](https://chriskirknielsen.com/blog/modern-fluid-typography-with-clamp/).
111
+
112
+ See also [fluid.tw](https://fluid.tw/) by [Max Barvian](https://barvian.me/).
113
+
114
+ ## License
115
+
116
+ MIT