@csstools/postcss-random-function 3.0.2 → 4.0.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,9 +1,11 @@
1
1
  # Changes to PostCSS Random Function
2
2
 
3
- ### 3.0.2
3
+ ### 4.0.0
4
4
 
5
- _April 12, 2026_
5
+ _July 22, 2026_
6
6
 
7
- - Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`3.2.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#320) (minor)
7
+ - Updated to match the [latest spec](https://drafts.csswg.org/css-values-5/#typedef-random-cache-key)
8
+ - use `element-scoped`, `property-scoped` and `property-index-scoped` keywords to tune the random results
9
+ - Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`3.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#330) (minor)
8
10
 
9
11
  [Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-random-function/CHANGELOG.md)
package/README.md CHANGED
@@ -21,16 +21,16 @@ div {
21
21
  /* becomes */
22
22
 
23
23
  div {
24
- color: oklch(0.7 0.2 177.17235deg);
24
+ color: oklch(0.7 0.2 166.80407deg);
25
25
  }
26
26
 
27
27
  div {
28
- color: oklch(0.7 0.2 176deg);
28
+ color: oklch(0.7 0.2 169deg);
29
29
  }
30
30
 
31
31
  div {
32
- margin: 41.7525px 70.01679px;
33
- padding: 44.03856px 44.03856px;
32
+ margin: 45.10305px 45.10305px;
33
+ padding: 73.36206px 73.36206px;
34
34
  }
35
35
  ```
36
36
 
@@ -94,19 +94,19 @@ div {
94
94
  /* becomes */
95
95
 
96
96
  div {
97
- color: oklch(0.7 0.2 177.17235deg);
97
+ color: oklch(0.7 0.2 166.80407deg);
98
98
  color: oklch(0.7 0.2 random(120deg, 240deg));
99
99
  }
100
100
 
101
101
  div {
102
- color: oklch(0.7 0.2 176deg);
102
+ color: oklch(0.7 0.2 169deg);
103
103
  color: oklch(0.7 0.2 random(120deg, 240deg, 7deg));
104
104
  }
105
105
 
106
106
  div {
107
- margin: 41.7525px 70.01679px;
107
+ margin: 45.10305px 45.10305px;
108
108
  margin: random(10px, 100px) random(10px, 100px);
109
- padding: 44.03856px 44.03856px;
109
+ padding: 73.36206px 73.36206px;
110
110
  padding: random(--padding, 10px, 100px) random(--padding, 10px, 100px);
111
111
  }
112
112
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@csstools/postcss-random-function",
3
3
  "description": "Use the random function in CSS",
4
- "version": "3.0.2",
4
+ "version": "4.0.0",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Antonio Laguna",
@@ -41,7 +41,7 @@
41
41
  "dist"
42
42
  ],
43
43
  "dependencies": {
44
- "@csstools/css-calc": "^3.2.0",
44
+ "@csstools/css-calc": "^3.3.0",
45
45
  "@csstools/css-parser-algorithms": "^4.0.0",
46
46
  "@csstools/css-tokenizer": "^4.0.0"
47
47
  },