skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
spences10/svelte-skills-kit110 installs

svelte-styling

Svelte CSS styling patterns. Use for scoped styles, CSS custom properties, style: directive, :global, or styling child components.

How do I install this agent skill?

npx skills add https://github.com/spences10/svelte-skills-kit --skill svelte-styling
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    No security issues detected. The skill provides documentation and code snippets for Svelte styling patterns, including scoped styles, directives, and global selectors.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Svelte Styling

Quick Start

JS vars in CSS: Use style: directive to set CSS custom properties from JavaScript.

<script>
	let columns = $state(3);
</script>

<div style:--columns={columns}>
	{@render children()}
</div>

<style>
	div {
		display: grid;
		grid-template-columns: repeat(var(--columns), 1fr);
	}
</style>

Styling Child Components

Preferred: Pass CSS custom properties as component props:

<!-- Parent.svelte -->
<Child --color="red" --spacing="1rem" />

<!-- Child.svelte -->
<h1>Hello</h1>

<style>
	h1 {
		color: var(--color, blue);
		margin: var(--spacing, 0);
	}
</style>

Fallback: Use :global when custom properties aren't possible (e.g., library components):

<div>
	<LibraryComponent />
</div>

<style>
	div :global {
		h1 { color: red; }
	}
</style>

Reference Files

Notes

  • All <style> blocks are scoped to the component by default
  • Use style: directive, not inline style strings, for dynamic values
  • Prefer CSS custom properties over :global for child styling
  • Last verified: 2026-03-12
<!-- PROGRESSIVE DISCLOSURE GUIDELINES: - Keep this file ~50 lines total (max ~150 lines) - Use 1-2 code blocks only (recommend 1) - Keep description <200 chars for Level 1 efficiency - Move detailed docs to references/ for Level 3 loading - This is Level 2 - quick reference ONLY, not a manual -->

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/spences10/svelte-skills-kit/svelte-styling">View svelte-styling on skillZs</a>