You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/src/compiler/parse/read/css-tree-cq/css_tree_parse.js

29 lines
593 B

// @ts-nocheck
import { fork } from 'css-tree';
import * as node from './node/index.js';
/**
* Extends `css-tree` for container query support by forking and adding new nodes and at-rule support for `@container`.
*
* The new nodes are located in `./node`.
*/
const cqSyntax = fork({
atrule: {
// extend or override at-rule dictionary
container: {
parse: {
prelude() {
return this.createSingleNodeList(this.ContainerQuery());
},
block(isStyleBlock = false) {
return this.Block(isStyleBlock);
}
}
}
},
node
});
export const parse = cqSyntax.parse;