Skip to content

Commit 28f234a

Browse files
author
Vlad Yelahin
committed
Allow processing of @container at-rule, add tests for it
1 parent 82ff87f commit 28f234a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ const factory = ({
210210
// eslint-disable-next-line no-param-reassign
211211
node.params = replaceValueSymbols(node.params, definitions);
212212
},
213+
container(node) {
214+
// eslint-disable-next-line no-param-reassign
215+
node.params = replaceValueSymbols(node.params, definitions);
216+
},
213217
value(node) {
214218
if (noEmitExports) {
215219
node.remove();

index.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,14 @@ test('should replace inside media queries', async (t) => {
271271
);
272272
});
273273

274+
test('should replace inside container queries', async (t) => {
275+
await run(
276+
t,
277+
'@value base: 10px;\n@container (min-width: calc(base * 200)) {}',
278+
'@value base: 10px;\n@container (min-width: calc(10px * 200)) {}',
279+
);
280+
});
281+
274282
test('should allow custom-property-style names', async (t) => {
275283
await run(
276284
t,

0 commit comments

Comments
 (0)