Home / Function/ visitors.ComplexSelector() — svelte Function Reference

visitors.ComplexSelector() — svelte Function Reference

Architecture documentation for the visitors.ComplexSelector() function in css-warn.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  d1f2efd4_c761_809d_aefa_164bba2a4213["visitors.ComplexSelector()"]
  4676a465_3cd7_1d4c_04b8_a56bf8469f18["css-warn.js"]
  d1f2efd4_c761_809d_aefa_164bba2a4213 -->|defined in| 4676a465_3cd7_1d4c_04b8_a56bf8469f18
  95b27b31_2f3e_48e6_ef18_ff72df778fd2["css_unused_selector()"]
  d1f2efd4_c761_809d_aefa_164bba2a4213 -->|calls| 95b27b31_2f3e_48e6_ef18_ff72df778fd2
  style d1f2efd4_c761_809d_aefa_164bba2a4213 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/2-analyze/css/css-warn.js lines 26–39

	ComplexSelector(node, context) {
		if (
			!node.metadata.used &&
			// prevent double-marking of `.unused:is(.unused)`
			(context.path.at(-2)?.type !== 'PseudoClassSelector' ||
				/** @type {AST.CSS.ComplexSelector} */ (context.path.at(-4))?.metadata.used)
		) {
			const content = context.state.stylesheet.content;
			const text = content.styles.substring(node.start - content.start, node.end - content.start);
			w.css_unused_selector(node, text);
		}

		context.next();
	},

Domain

Subdomains

Frequently Asked Questions

What does visitors.ComplexSelector() do?
visitors.ComplexSelector() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/2-analyze/css/css-warn.js.
Where is visitors.ComplexSelector() defined?
visitors.ComplexSelector() is defined in packages/svelte/src/compiler/phases/2-analyze/css/css-warn.js at line 26.
What does visitors.ComplexSelector() call?
visitors.ComplexSelector() calls 1 function(s): css_unused_selector.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free