Olum logoOlum
Docs

core

  • Introduction
  • Get Started
  • Component File Structure
  • State & Reactivity
  • Text Interpolation
  • Watchers
  • Conditionals
  • Show / Hide
  • Loops
  • Events
  • Two-way Binding
  • Attributes
  • Raw HTML
  • Components & Props
  • Slots
  • Imports
  • Props & Methods Scope
  • Scoped CSS
  • Lifecycle Hooks
  • Escaping & Security
  • Common Mistakes
  • Limitations
  • Quick Reference

router

  • Router
  • File Conventions
  • Reading Route Params
  • Navigating with to
  • Active Link Styling
  • History Mode & the 404 Page
Home/Docs/Scoped CSS
Advanced

Scoped CSS

A component's <style> is automatically scoped — selectors only affect that component's elements. Just write normal CSS:

Component.html
<style>
  .title { color: #4f46e5; }   /* won't leak to other components */
</style>
<h1 class="title">Hello</h1>
Props & Methods ScopeLifecycle Hooks
Edit on GitHub
Olum logoOlum

The fastest way to turn ideas into apps for hackathons.

Framework

  • Introduction
  • Quick Start
  • Examples

Ecosystem

  • Router
  • Extension
  • Devtool

Community

  • GitHub
  • Twitter
  • Blog

Resources

  • Docs
  • API Reference
  • Templates

Sponsor Olum

Help keep Olum free and open source.

Sponsor

© 2026 Olum contributors. MIT License.

Made with♥by the Community