Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed May 13, 2024
1 parent 4985318 commit 9407280
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 46 deletions.
6 changes: 3 additions & 3 deletions lib/utils/resolveNestedSelectorsForRule.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const selectorResolveNested = require('@csstools/selector-resolve-nested');
const getRuleSelector = require('./getRuleSelector.cjs');
const typeGuards = require('./typeGuards.cjs');
const isStandardSyntaxRule = require('./isStandardSyntaxRule.cjs');
const selectorAST = require('./selectorAST.cjs');
const parseSelector = require('./parseSelector.cjs');
const selectorParser = require('postcss-selector-parser');

/**
Expand All @@ -21,7 +21,7 @@ function resolveNestedSelectorsForRule(rule, result) {
/** @typedef {import('postcss').Root} Root */
/** @typedef {import('postcss').Container} Container */

const ownAST = selectorAST(getRuleSelector(rule), result, rule);
const ownAST = parseSelector(getRuleSelector(rule), result, rule);

if (!ownAST) return [];

Expand All @@ -48,7 +48,7 @@ function resolveNestedSelectorsForRule(rule, result) {

if (!isStandardSyntaxRule(child)) return [];

const childAST = selectorAST(getRuleSelector(child), result, child);
const childAST = parseSelector(getRuleSelector(child), result, child);

if (!childAST) return [];

Expand Down
6 changes: 3 additions & 3 deletions lib/utils/resolveNestedSelectorsForRule.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { resolveNestedSelector } from '@csstools/selector-resolve-nested';
import getRuleSelector from './getRuleSelector.mjs';
import { isRule } from './typeGuards.mjs';
import isStandardSyntaxRule from './isStandardSyntaxRule.mjs';
import selectorAST from './selectorAST.mjs';
import parseSelector from './parseSelector.mjs';
import selectorParser from 'postcss-selector-parser';

/**
Expand All @@ -18,7 +18,7 @@ export default function resolveNestedSelectorsForRule(rule, result) {
/** @typedef {import('postcss').Root} Root */
/** @typedef {import('postcss').Container} Container */

const ownAST = selectorAST(getRuleSelector(rule), result, rule);
const ownAST = parseSelector(getRuleSelector(rule), result, rule);

if (!ownAST) return [];

Expand All @@ -45,7 +45,7 @@ export default function resolveNestedSelectorsForRule(rule, result) {

if (!isStandardSyntaxRule(child)) return [];

const childAST = selectorAST(getRuleSelector(child), result, child);
const childAST = parseSelector(getRuleSelector(child), result, child);

if (!childAST) return [];

Expand Down
23 changes: 0 additions & 23 deletions lib/utils/selectorAST.cjs

This file was deleted.

17 changes: 0 additions & 17 deletions lib/utils/selectorAST.mjs

This file was deleted.

0 comments on commit 9407280

Please sign in to comment.