RubyGems Navigation menu

style_capsule 1.1.0

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.

Gemfile:
=

install:
=

Versions:

  1. 1.2.0 November 24, 2025 (35.5 KB)
  2. 1.1.0 November 21, 2025 (34.5 KB)
  3. 1.0.2 November 21, 2025 (31.5 KB)
Show all versions (5 total)

Development Dependencies (16):

activesupport >= 6.0, < 9.0
appraisal ~> 2
phlex-rails ~> 2.0
railties >= 6.0, < 9.0
rake ~> 13
rbs ~> 3
rspec ~> 3
simplecov ~> 0.22
standard ~> 1
webmock ~> 3

Owners:

Pushed by:

Authors:

  • Andrei Makarov

SHA 256 checksum:

=

Total downloads 550

For this version 124

Version Released:

License:

MIT

Required Ruby Version: >= 3.0

New versions require MFA: true

Version published with MFA: true

Links: