
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Decorate your <body>
with CSS Classes indicating platform, browser, browser version, and more.
Add this line to your application's Gemfile:
gem 'rack-body_classes'
And then execute:
$ bundle
First, add the middlware to your application...
use Rack::BodyClasses
config.middleware.use Rack::BodyClasses
Then, in your layout, output env['rack.body_classes']
in your <body>
tag's class
attribute.
Here's a trivial layout file, formatted with the slim
templating engine, to give you an example:
html
head
body class="#{env['rack.body_classes']}"
== yield
When rendered, the body tag will look something like this:
<body class="desktop chrome modern mac webkit">
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)This middleware is made possible by Browser
gem and MobileESP (converted)
gem and borrows a bit of code from Mobvious
gem. Mad props and many thank yous to these gem authors.
FAQs
Unknown package
We found that rack-body_classes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.