Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b456217
private property registrations
romainmenke Nov 10, 2026
f672c7d
wip
romainmenke Nov 11, 2026
c677e36
wip
romainmenke Nov 12, 2026
0e3cc9f
wip
romainmenke Nov 12, 2026
b2213cd
more fixes
romainmenke Nov 12, 2026
95d9c47
fix
romainmenke Nov 12, 2026
f23ccdd
fixes
romainmenke Nov 13, 2026
2720466
fix
romainmenke Nov 13, 2026
2155824
refactor
romainmenke Nov 13, 2026
0f8164a
fix
romainmenke Nov 13, 2026
a523547
refactor
romainmenke Nov 13, 2026
651f1d4
fix
romainmenke Nov 14, 2026
af25183
refactor
romainmenke Nov 14, 2026
d362ab7
fix
romainmenke Nov 14, 2026
f526ff7
merge
romainmenke Nov 14, 2026
bc2acee
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 14, 2026
00aad00
Merge branch 'main' into private-property-registrations--unassuming-p…
romainmenke Nov 14, 2026
cfa66f7
utilities-for-property-registrations
romainmenke Nov 14, 2026
cd8f264
fix
romainmenke Nov 14, 2026
7ebbf88
fix
romainmenke Nov 14, 2026
2c64ad5
fix
romainmenke Nov 14, 2026
7cd6856
Merge remote-tracking branch 'origin/utilities-for-property-registrat…
romainmenke Nov 14, 2026
eac2a4f
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 14, 2026
00c8386
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 15, 2026
3fb21d5
fix
romainmenke Nov 15, 2026
6c40a54
utilities-for-private-properties
romainmenke Nov 15, 2026
8d1da00
fix
romainmenke Nov 15, 2026
c507ac3
Merge remote-tracking branch 'origin/utilities-for-private-properties…
romainmenke Nov 15, 2026
4e1c9f5
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 15, 2026
0894f71
fix
romainmenke Nov 15, 2026
5d290d7
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 15, 2026
5d9ca1a
rebuild
romainmenke Nov 15, 2026
ddfde98
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 15, 2026
c210a0b
reduce the changelog
romainmenke Nov 15, 2026
781b0ec
Merge remote-tracking branch 'origin/main' into private-property-regi…
romainmenke Nov 16, 2026
ccfa549
fix
romainmenke Nov 16, 2026
58d5cf4
cleanup
romainmenke Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
935 changes: 8 additions & 927 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions plugin-packs/postcss-preset-env/test/_tape.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ postcssTape(plugin)({
}),
],
},
'private-rule': {
message: 'supports @private rules',
},
'postcss-functions': {
message: 'does not clone `@function` rules when generating conditional rules',
options: {
Expand Down
19 changes: 19 additions & 0 deletions plugin-packs/postcss-preset-env/test/private-rule.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.example {
@private {
--size: 2px;
}

width: var(--size);
}

@mixin --with-private() {
@private {
--size: 3px;
}

height: var(--size);
}

.with-private {
@apply --with-private;
}
15 changes: 15 additions & 0 deletions plugin-packs/postcss-preset-env/test/private-rule.expect.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.example {
@private {
--size: 2px;
}

width: var(--size);
}

.with-private {
--_csstools-m-1e49l6f-0--size: 3px;

height: 3px;

height: var(--_csstools-m-1e49l6f-0--size);
}
1 change: 0 additions & 1 deletion plugins/postcss-custom-functions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ html {
--_csstools-cf-1gice1e-2-result: calc(2 * var(--_csstools-cf-1gice1e-3-arg-0));
margin: var(--_csstools-cf-1gice1e-2-result);
}

@property --_csstools-cf-1gice1e-3-arg-0 {
syntax: "<length>";
inherits: true;
Expand Down
2 changes: 1 addition & 1 deletion plugins/postcss-custom-functions/dist/index.mjs

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions plugins/postcss-custom-functions/src/transpile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ export class CustomFunctionTranspiler {
});

for (const registration of registrations) {
formatGeneratedNode(registration, '\n\n', '');
this.spendBudget(countNodes(registration));
}

Expand All @@ -552,9 +551,6 @@ export class CustomFunctionTranspiler {

private pushRegistration(registration: AtRule, conditionals: Array<AtRule>): void {
const registrations = wrapInConditionalGroupRules([registration], conditionals);
for (const node of registrations) {
formatGeneratedNode(node, '\n\n', '');
}

this.registrations.push(...registrations);
}
Expand Down Expand Up @@ -1401,18 +1397,4 @@ function collectDeclaredLocalNamesFrom(nodes: Array<ChildNode>, inConditional: b
}
}

function formatGeneratedNode(node: ChildNode, before: string, indent: string): void {
node.cleanRaws(true);
node.raws.before = before;

if (node.type === 'decl' || node.type === 'comment') {
return;
}

const childIndent = `${indent}\t`;
for (const child of node.nodes || []) {
formatGeneratedNode(child, `\n${childIndent}`, childIndent);
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@
}

@media (width >= 50px) {
@property --_csstools-cf-154dd4k-a-local-size <length>: 10px
@property --_csstools-cf-154dd4k-a-local-size <length>: 10px
}

@supports (width: 100px) {
@property --_csstools-cf-154dd4k-c-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 5px
@supports (width: 100px) {@property --_csstools-cf-154dd4k-c-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 5px
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,12 @@
}

@media (width >= 50px) {
@property --_csstools-cf-154dd4k-a-local-size <length>: 10px
@property --_csstools-cf-154dd4k-a-local-size <length>: 10px
}

@supports (width: 100px) {
@property --_csstools-cf-154dd4k-c-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 5px
@supports (width: 100px) {@property --_csstools-cf-154dd4k-c-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 5px
}
}
28 changes: 13 additions & 15 deletions plugins/postcss-custom-functions/test/conditional-locals.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,21 @@
.conditional-parameter-registration {
--actual: var(--_csstools-cf-m5jfqc-6-result);
}

@supports (not (width: 100px)) {
@property --_csstools-cf-m5jfqc-5-local-x {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}
}

@property --_csstools-cf-m5jfqc-7-arg-0 {
@supports (not (width: 100px)) {
@property --_csstools-cf-m5jfqc-5-local-x {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}
}
@property --_csstools-cf-m5jfqc-7-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 20px;
}

@property --_csstools-cf-m5jfqc-7-local-x {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}
@property --_csstools-cf-m5jfqc-7-local-x {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ html {
--_csstools-cf-1gice1e-2-result: calc(2 * var(--_csstools-cf-1gice1e-3-arg-0));
margin: var(--_csstools-cf-1gice1e-2-result);
}

@property --_csstools-cf-1gice1e-3-arg-0 {
syntax: "<length>";
inherits: true;
Expand Down
111 changes: 49 additions & 62 deletions plugins/postcss-custom-functions/test/property.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,83 +133,70 @@
--_csstools-cf-7q9ama-10-result: var(--_csstools-cf-7q9ama-11-local-size);
width: var(--_csstools-cf-7q9ama-10-result);
}
@property --_csstools-cf-7q9ama-1-local-size {
syntax: "<length>";
inherits: false;
initial-value: 10px;
}
@property --_csstools-cf-7q9ama-3-local-size {
syntax: "<length>";
inherits: false;
initial-value: 10px;
}
@property --_csstools-cf-7q9ama-5-local-size {
syntax: "<length>";
inherits: false;
initial-value: 5px;
}
@property --_csstools-cf-7q9ama-7-local-size {
syntax: "<length>";
inherits: false;
initial-value: 15px;
}
@property --_csstools-cf-7q9ama-9-local-size-a, --_csstools-cf-7q9ama-9-local-size-b {
syntax: "<length>";
inherits: false;
initial-value: 10px;
}
@property --_csstools-cf-7q9ama-b-local-size <length>: 10px;
@property --_csstools-cf-7q9ama-d-local-colors type(<color>#): red, blue;
@property --_csstools-cf-7q9ama-f-local-size <length>:;
@property --_csstools-cf-7q9ama-f-local-untyped-empty:;
@property --_csstools-cf-7q9ama-h-local-size <length>: 5px;
@property --_csstools-cf-7q9ama-j-local-size type(<length> | <percentage>): 10px;
@media (min-width: 1000px) {
@property --_csstools-cf-7q9ama-n-local-size <length>: 10px;
}
@property --_csstools-cf-7q9ama-p-local-size <length>: 10px;
@property --_csstools-cf-7q9ama-r-local-size <length>: 10px;
@media (min-width: 1000px) {
@property --_csstools-cf-7q9ama-t-local-size <length>: 10px
}
@property --_csstools-cf-7q9ama-v-local-foo <length>: 10px;
@property --_csstools-cf-7q9ama-x-arg-0 {

@property --_csstools-cf-7q9ama-1-local-size {
syntax: "<length>";
inherits: false;
initial-value: 10px;
}

@property --_csstools-cf-7q9ama-3-local-size {
syntax: "<length>";
inherits: false;
inherits: true;

initial-value: 10px;
}
@property --_csstools-cf-7q9ama-x-arg-0 <length>: 20px;
@property --_csstools-cf-7q9ama-z-arg-0 {

@property --_csstools-cf-7q9ama-5-local-size {
syntax: "<length>";
inherits: false;
initial-value: 5px;
}

@property --_csstools-cf-7q9ama-7-local-size {
syntax: "<length>";
inherits: false;
initial-value: 15px;
}
inherits: true;

@property --_csstools-cf-7q9ama-9-local-size-a, --_csstools-cf-7q9ama-9-local-size-b {
syntax: "<length>";
inherits: false;
initial-value: 10px;
}
@property --_csstools-cf-7q9ama-z-arg-0 <length>: 20px;
@property --_csstools-cf-7q9ama-11-arg-0 {

@property --_csstools-cf-7q9ama-b-local-size <length>: 10px;

@property --_csstools-cf-7q9ama-d-local-colors type(<color>#): red, blue;

@property --_csstools-cf-7q9ama-f-local-size <length>:;

@property --_csstools-cf-7q9ama-f-local-untyped-empty:;

@property --_csstools-cf-7q9ama-h-local-size <length>: 5px;

@property --_csstools-cf-7q9ama-j-local-size type(<length> | <percentage>): 10px;

@media (min-width: 1000px) {
@property --_csstools-cf-7q9ama-n-local-size <length>: 10px;
}

@property --_csstools-cf-7q9ama-p-local-size <length>: 10px;

@property --_csstools-cf-7q9ama-r-local-size <length>: 10px;

@media (min-width: 1000px) {
@property --_csstools-cf-7q9ama-t-local-size <length>: 10px
}

@property --_csstools-cf-7q9ama-v-local-foo <length>: 10px;

@property --_csstools-cf-7q9ama-x-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}

@property --_csstools-cf-7q9ama-x-arg-0 <length>: 20px;

@property --_csstools-cf-7q9ama-z-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}

@property --_csstools-cf-7q9ama-z-arg-0 <length>: 20px;

@property --_csstools-cf-7q9ama-11-arg-0 {
syntax: "<length>";
inherits: true;
initial-value: 10px;
}

@property --_csstools-cf-7q9ama-11-local-size <length>: 20px
@property --_csstools-cf-7q9ama-11-local-size <length>: 20px
Loading
Loading