5 articles tagged #css on hackpile.dev.
- Global Styles
Learn about global CSS that reaches beyond component boundaries: :global(), :global{} blocks, keyframes, imports, and when to use each approach.
- Dynamic Class Binding
Master dynamic class binding in Svelte 5: the class attribute, class: directive, component merging, and TypeScript with ClassValue.
- CSS Custom Properties
Master Svelte 5's --style-props for passing CSS variables to components — the cleanest way to build themeable, customizable UI without breaking encapsulation.
- Scoped CSS
How Svelte scopes CSS at compile time, the three boundary rules, scoped keyframes, CSS nesting, and specificity differences.
- Dynamic Inline Styles
Dynamic Inline Styles for clean, reactive inline styles — from basic usage to dynamic theming, conditional values, and the !important modifier.