css-utility-functions 1.2.0 → 1.2.1
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 +0 -18
- package/dist/index.css +1 -53
- package/dist/index.min.css +2 -7
- package/package.json +2 -2
- package/src/index.css +0 -1
- package/src/effects/polka-dots.css +0 -51
package/README.md
CHANGED
|
@@ -178,23 +178,6 @@ Inset elevation shadows for embossed/debossed effects. Optionally control light
|
|
|
178
178
|
}
|
|
179
179
|
```
|
|
180
180
|
|
|
181
|
-
#### `--polka-dots()`
|
|
182
|
-
Repeating polka dot pattern background using two offset radial-gradient layers.
|
|
183
|
-
|
|
184
|
-
```css
|
|
185
|
-
.polka-bg {
|
|
186
|
-
background: --polka-dots();
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.custom-dots {
|
|
190
|
-
background: --polka-dots(
|
|
191
|
-
--dot-color: #3b82f6,
|
|
192
|
-
--spacing: 10px,
|
|
193
|
-
--dot-size: 30%
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
181
|
---
|
|
199
182
|
|
|
200
183
|
### Layout Utilities
|
|
@@ -248,7 +231,6 @@ Convert between pixels and rem (assumes 16px base).
|
|
|
248
231
|
| `--shadow()` | Elevation shadows | `--shadow(3)` |
|
|
249
232
|
| `--bevel()` | Inset shadows (emboss/deboss) | `--bevel(2)` |
|
|
250
233
|
| `--diagonal-lines()` | Diagonal line pattern | `--diagonal-lines(--angle: 45deg)` |
|
|
251
|
-
| `--polka-dots()` | Polka dot pattern | `--polka-dots(--dot-color: black, --spacing: 8px)` |
|
|
252
234
|
| **Layout Utilities** |||
|
|
253
235
|
| `--neg()` | Negate value | `--neg(2rem)` → `-2rem` |
|
|
254
236
|
| **Math Utilities** |||
|
package/dist/index.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CSS Utility Functions v1.2.
|
|
2
|
+
* CSS Utility Functions v1.2.1
|
|
3
3
|
* Author: Yair Even-Or
|
|
4
4
|
* Repository: https://github.com/yairEO/css-utility-functions
|
|
5
5
|
*
|
|
@@ -507,58 +507,6 @@
|
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
/**
|
|
511
|
-
* --polka-dots() — Polka Dot Pattern Background
|
|
512
|
-
*
|
|
513
|
-
* Generate a repeating polka dot pattern using two offset radial-gradient layers.
|
|
514
|
-
* Returns a complete background value (image + position + size) that can be used
|
|
515
|
-
* directly as a background property value.
|
|
516
|
-
*
|
|
517
|
-
* @param {color} --dot-color - Color of the dots, default: currentColor
|
|
518
|
-
* @param {length-percentage} --dot-size - Size of each dot; accepts px or %. A 1px feather zone
|
|
519
|
-
* is applied at the edge for anti-aliasing. Default: 20%
|
|
520
|
-
* @param {length} --spacing - Half the tile size; controls dot density, default: 5px
|
|
521
|
-
* @param {color} --bg-color - Background color between dots, default: transparent
|
|
522
|
-
* @returns {image} - Complete two-layer radial-gradient background value
|
|
523
|
-
*
|
|
524
|
-
* @example
|
|
525
|
-
* .polka-bg {
|
|
526
|
-
* background: --polka-dots();
|
|
527
|
-
* }
|
|
528
|
-
*
|
|
529
|
-
* @example
|
|
530
|
-
* .custom-dots {
|
|
531
|
-
* background: --polka-dots(
|
|
532
|
-
* --dot-color: #3b82f6,
|
|
533
|
-
* --spacing: 10px,
|
|
534
|
-
* --dot-size: 30%
|
|
535
|
-
* );
|
|
536
|
-
* }
|
|
537
|
-
*
|
|
538
|
-
* @example
|
|
539
|
-
* .subtle-dots {
|
|
540
|
-
* color: #94a3b8;
|
|
541
|
-
* background: --polka-dots(
|
|
542
|
-
* --dot-color: currentColor,
|
|
543
|
-
* --spacing: 8px,
|
|
544
|
-
* --dot-size: 15%
|
|
545
|
-
* );
|
|
546
|
-
* }
|
|
547
|
-
*/
|
|
548
|
-
|
|
549
|
-
@function --polka-dots(
|
|
550
|
-
--dot-color <color>: currentColor,
|
|
551
|
-
--dot-size <length-percentage>: 20%,
|
|
552
|
-
--spacing <length>: 5px,
|
|
553
|
-
--bg-color <color>: transparent
|
|
554
|
-
) returns <image> {
|
|
555
|
-
result:
|
|
556
|
-
radial-gradient(var(--dot-color) calc(var(--dot-size) - 1px), var(--bg-color) var(--dot-size))
|
|
557
|
-
0 0 / calc(var(--spacing) * 2) calc(var(--spacing) * 2),
|
|
558
|
-
radial-gradient(var(--dot-color) calc(var(--dot-size) - 1px), var(--bg-color) var(--dot-size))
|
|
559
|
-
var(--spacing) var(--spacing) / calc(var(--spacing) * 2) calc(var(--spacing) * 2);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
510
|
/* Layout Utilities */
|
|
563
511
|
|
|
564
512
|
/**
|
package/dist/index.min.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CSS Utility Functions v1.2.
|
|
2
|
+
* CSS Utility Functions v1.2.1
|
|
3
3
|
* Author: Yair Even-Or
|
|
4
4
|
* Repository: https://github.com/yairEO/css-utility-functions
|
|
5
5
|
*
|
|
@@ -49,12 +49,7 @@
|
|
|
49
49
|
--line-width <length>: 1px,
|
|
50
50
|
--gap-width <length>: 4px,
|
|
51
51
|
--gap-color <color>: transparent
|
|
52
|
-
) returns <image>{result:repeating-linear-gradient(var(--angle),var(--line-color) 0,var(--line-color) calc(var(--line-width) - 1px),var(--gap-color) calc(var(--line-width) + 1px),var(--gap-color) calc(var(--line-width) + var(--gap-width)))}@function --
|
|
53
|
-
--dot-color <color>: currentColor,
|
|
54
|
-
--dot-size <length-percentage>: 20%,
|
|
55
|
-
--spacing <length>: 5px,
|
|
56
|
-
--bg-color <color>: transparent
|
|
57
|
-
) returns <image>{result:radial-gradient(var(--dot-color) calc(var(--dot-size) - 1px),var(--bg-color) var(--dot-size)) 0 0 /calc(var(--spacing) * 2) calc(var(--spacing) * 2),radial-gradient(var(--dot-color) calc(var(--dot-size) - 1px),var(--bg-color) var(--dot-size)) var(--spacing) var(--spacing) /calc(var(--spacing) * 2) calc(var(--spacing) * 2)}@function --neg(--value <length>) returns <length>{result:calc(var(--value) * -1)}@function --lerp(
|
|
52
|
+
) returns <image>{result:repeating-linear-gradient(var(--angle),var(--line-color) 0,var(--line-color) calc(var(--line-width) - 1px),var(--gap-color) calc(var(--line-width) + 1px),var(--gap-color) calc(var(--line-width) + var(--gap-width)))}@function --neg(--value <length>) returns <length>{result:calc(var(--value) * -1)}@function --lerp(
|
|
58
53
|
--a <length-percentage>,
|
|
59
54
|
--b <length-percentage>,
|
|
60
55
|
--t <number>: 0.5
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "css-utility-functions",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "A collection of reusable CSS custom native functions using the @function syntax",
|
|
5
5
|
"main": "dist/index.css",
|
|
6
6
|
"style": "dist/index.css",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"watch:html": "node build-html.js --watch",
|
|
19
19
|
"dev": "concurrently \"npm run watch:html\" \"npm run watch\"",
|
|
20
20
|
"prebuild": "npm run build:html",
|
|
21
|
-
"version": "npm run build:all"
|
|
21
|
+
"version": "npm run build:all && git add -A"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"css",
|
package/src/index.css
CHANGED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* --polka-dots() — Polka Dot Pattern Background
|
|
3
|
-
*
|
|
4
|
-
* Generate a repeating polka dot pattern using two offset radial-gradient layers.
|
|
5
|
-
* Returns a complete background value (image + position + size) that can be used
|
|
6
|
-
* directly as a background property value.
|
|
7
|
-
*
|
|
8
|
-
* @param {color} --dot-color - Color of the dots, default: currentColor
|
|
9
|
-
* @param {length-percentage} --dot-size - Size of each dot; accepts px or %. A 1px feather zone
|
|
10
|
-
* is applied at the edge for anti-aliasing. Default: 20%
|
|
11
|
-
* @param {length} --spacing - Half the tile size; controls dot density, default: 5px
|
|
12
|
-
* @param {color} --bg-color - Background color between dots, default: transparent
|
|
13
|
-
* @returns {image} - Complete two-layer radial-gradient background value
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* .polka-bg {
|
|
17
|
-
* background: --polka-dots();
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* .custom-dots {
|
|
22
|
-
* background: --polka-dots(
|
|
23
|
-
* --dot-color: #3b82f6,
|
|
24
|
-
* --spacing: 10px,
|
|
25
|
-
* --dot-size: 30%
|
|
26
|
-
* );
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* .subtle-dots {
|
|
31
|
-
* color: #94a3b8;
|
|
32
|
-
* background: --polka-dots(
|
|
33
|
-
* --dot-color: currentColor,
|
|
34
|
-
* --spacing: 8px,
|
|
35
|
-
* --dot-size: 15%
|
|
36
|
-
* );
|
|
37
|
-
* }
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
@function --polka-dots(
|
|
41
|
-
--dot-color <color>: currentColor,
|
|
42
|
-
--dot-size <length-percentage>: 20%,
|
|
43
|
-
--spacing <length>: 5px,
|
|
44
|
-
--bg-color <color>: transparent
|
|
45
|
-
) returns <image> {
|
|
46
|
-
result:
|
|
47
|
-
radial-gradient(var(--dot-color) calc(var(--dot-size) - 1px), var(--bg-color) var(--dot-size))
|
|
48
|
-
0 0 / calc(var(--spacing) * 2) calc(var(--spacing) * 2),
|
|
49
|
-
radial-gradient(var(--dot-color) calc(var(--dot-size) - 1px), var(--bg-color) var(--dot-size))
|
|
50
|
-
var(--spacing) var(--spacing) / calc(var(--spacing) * 2) calc(var(--spacing) * 2);
|
|
51
|
-
}
|