Home / Function/ remove_global_pseudo_class() — svelte Function Reference

remove_global_pseudo_class() — svelte Function Reference

Architecture documentation for the remove_global_pseudo_class() function in index.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  fc43c5dc_fff8_e84f_ae90_1d56c134148c["remove_global_pseudo_class()"]
  194b07ed_c18e_6587_618d_b4b4d02442e0["index.js"]
  fc43c5dc_fff8_e84f_ae90_1d56c134148c -->|defined in| 194b07ed_c18e_6587_618d_b4b4d02442e0
  2e4fa17c_b7f9_4202_b8c2_b2e48e6d30d8["visitors.ComplexSelector()"]
  2e4fa17c_b7f9_4202_b8c2_b2e48e6d30d8 -->|calls| fc43c5dc_fff8_e84f_ae90_1d56c134148c
  style fc43c5dc_fff8_e84f_ae90_1d56c134148c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/3-transform/css/index.js lines 392–407

function remove_global_pseudo_class(selector, combinator, state) {
	if (selector.args === null) {
		let start = selector.start;
		if (combinator?.name === ' ') {
			// div :global.x becomes div.x
			while (/\s/.test(state.code.original[start - 1])) start--;
		}

		// update(...), not remove(...) because there could be a closing unused comment at the end
		state.code.update(start, selector.start + ':global'.length, '');
	} else {
		state.code
			.remove(selector.start, selector.start + ':global('.length)
			.remove(selector.end - 1, selector.end);
	}
}

Domain

Subdomains

Frequently Asked Questions

What does remove_global_pseudo_class() do?
remove_global_pseudo_class() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/3-transform/css/index.js.
Where is remove_global_pseudo_class() defined?
remove_global_pseudo_class() is defined in packages/svelte/src/compiler/phases/3-transform/css/index.js at line 392.
What calls remove_global_pseudo_class()?
remove_global_pseudo_class() is called by 1 function(s): visitors.ComplexSelector.

Analyze Your Own Codebase

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

Try Supermodel Free