Skip to content

Commit 3e9d953

Browse files
committed
fix: bump package versions to 0.1.2 and enhance effectStyles with better gradient border support
1 parent c661178 commit 3e9d953

4 files changed

Lines changed: 38 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "protohiro-effects-monorepo",
33
"private": true,
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"description": "Zero-wrapper React CSS effects engine.",
66
"packageManager": "pnpm@9.15.0",
77
"scripts": {

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@protohiro/effects-core",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Core runtime utilities for ProtoEffects CSS-first effects.",
55
"license": "MIT",
66
"type": "module",

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@protohiro/effects",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Zero-wrapper React hooks for composable CSS effects.",
55
"license": "MIT",
66
"type": "module",

packages/react/src/shared/effectStyles.ts

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
11
export const EFFECT_STYLES = `
22
.pe-gradient-border {
33
position: relative;
4+
isolation: isolate;
45
border-radius: var(--pe-gb-radius, inherit);
5-
border: var(--pe-gb-thickness, 2px) solid transparent;
6-
background:
7-
linear-gradient(var(--pe-bg-fill, transparent), var(--pe-bg-fill, transparent)) padding-box,
8-
linear-gradient(var(--pe-gb-angle, 120deg), var(--pe-gb-colors, #5eead4, #0ea5e9)) border-box;
6+
border-color: transparent;
7+
}
8+
9+
.pe-gradient-border::before {
10+
content: '';
11+
position: absolute;
12+
z-index: -1;
13+
inset: calc(var(--pe-gb-thickness, 2px) * -1);
14+
border-radius: calc(var(--pe-gb-radius, 0px) + var(--pe-gb-thickness, 2px));
15+
box-sizing: border-box;
16+
padding: var(--pe-gb-thickness, 2px);
17+
background: linear-gradient(var(--pe-gb-angle, 120deg), var(--pe-gb-colors, #5eead4, #0ea5e9));
18+
pointer-events: none;
19+
20+
/* Hollow out the center so only the ring remains. */
21+
-webkit-mask:
22+
linear-gradient(#fff 0 0) content-box,
23+
linear-gradient(#fff 0 0);
24+
-webkit-mask-composite: xor;
25+
mask:
26+
linear-gradient(#fff 0 0) content-box,
27+
linear-gradient(#fff 0 0);
28+
mask-composite: exclude;
29+
}
30+
31+
@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
32+
.pe-gradient-border::before {
33+
z-index: -1;
34+
inset: calc(var(--pe-gb-thickness, 2px) * -1);
35+
border-radius: calc(var(--pe-gb-radius, 0px) + var(--pe-gb-thickness, 2px));
36+
padding: 0;
37+
border: var(--pe-gb-thickness, 2px) solid;
38+
border-image: linear-gradient(var(--pe-gb-angle, 120deg), var(--pe-gb-colors, #5eead4, #0ea5e9)) 1;
39+
}
940
}
1041
1142
.pe-glow {

0 commit comments

Comments
 (0)