Provides component-scoped CSS encapsulation using [data-capsule] attributes for Phlex components, ViewComponent components, and ERB templates. Styles are automatically scoped to prevent leakage between components. Inspired by component-based CSS approaches like Angular's view encapsulation and CSS modules. Works with Rails and can be used standalone in other Ruby frameworks (Sinatra, Hanami, etc.) or plain Ruby scripts.
Required Ruby Version
>= 3.0
Authors
Andrei Makarov
Versions
- 2.0.1 July 03, 2026 (45 KB)
- 2.0.0 July 03, 2026 (44.5 KB)
- 1.4.0 November 26, 2025 (40.5 KB)
- 1.3.0 November 26, 2025 (39.5 KB)
- 1.2.0 November 24, 2025 (35.5 KB)