Home / Function/ createStylesheetElement() — astro Function Reference

createStylesheetElement() — astro Function Reference

Architecture documentation for the createStylesheetElement() function in ssr-element.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  5dc18e6d_4a24_c02c_4743_89d3dc0d96a9["createStylesheetElement()"]
  0bd2e8b9_eb60_d252_4865_5b65ac27a240["ssr-element.ts"]
  5dc18e6d_4a24_c02c_4743_89d3dc0d96a9 -->|defined in| 0bd2e8b9_eb60_d252_4865_5b65ac27a240
  5529c158_7faa_42c8_94fe_f80d07922651["createStylesheetElementSet()"]
  5529c158_7faa_42c8_94fe_f80d07922651 -->|calls| 5dc18e6d_4a24_c02c_4743_89d3dc0d96a9
  203ad4dc_d1a5_a18b_7997_cafa1ca9ea12["createAssetLink()"]
  5dc18e6d_4a24_c02c_4743_89d3dc0d96a9 -->|calls| 203ad4dc_d1a5_a18b_7997_cafa1ca9ea12
  style 5dc18e6d_4a24_c02c_4743_89d3dc0d96a9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/render/ssr-element.ts lines 27–47

function createStylesheetElement(
	stylesheet: StylesheetAsset,
	base?: string,
	assetsPrefix?: AssetsPrefix,
	queryParams?: URLSearchParams,
): SSRElement {
	if (stylesheet.type === 'inline') {
		return {
			props: {},
			children: stylesheet.content,
		};
	} else {
		return {
			props: {
				rel: 'stylesheet',
				href: createAssetLink(stylesheet.src, base, assetsPrefix, queryParams),
			},
			children: '',
		};
	}
}

Domain

Subdomains

Frequently Asked Questions

What does createStylesheetElement() do?
createStylesheetElement() is a function in the astro codebase, defined in packages/astro/src/core/render/ssr-element.ts.
Where is createStylesheetElement() defined?
createStylesheetElement() is defined in packages/astro/src/core/render/ssr-element.ts at line 27.
What does createStylesheetElement() call?
createStylesheetElement() calls 1 function(s): createAssetLink.
What calls createStylesheetElement()?
createStylesheetElement() is called by 1 function(s): createStylesheetElementSet.

Analyze Your Own Codebase

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

Try Supermodel Free