source: frontend/node_modules/cssnano-utils/src/getArguments.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 535 bytes
Line 
1'use strict';
2/**
3 * Extracts the arguments of a CSS function or AtRule.
4 *
5 * @param {import('postcss-value-parser').ParsedValue | import('postcss-value-parser').FunctionNode} node
6 * @return {import('postcss-value-parser').Node[][]}
7 */
8module.exports = function getArguments(node) {
9 /** @type {import('postcss-value-parser').Node[][]} */
10 const list = [[]];
11 for (const child of node.nodes) {
12 if (child.type !== 'div') {
13 list[list.length - 1].push(child);
14 } else {
15 list.push([]);
16 }
17 }
18 return list;
19};
Note: See TracBrowser for help on using the repository browser.