TL;DR

Phoenix LiveView 1.2 has been officially released, adding colocated CSS capabilities and small enhancements. Developers can now embed CSS directly within HEEx templates, with ongoing work on CSS scoping support.

Phoenix LiveView 1.2.0 has been officially released, introducing colocated CSS support and other improvements, enabling developers to embed CSS directly within HEEx templates.

The new version, LiveView 1.2, builds on previous work by allowing developers to colocate CSS in HEEx templates, similar to how colocated JavaScript is handled. This is achieved through the use of the :type attribute, which extracts CSS content into a dedicated folder during compilation, facilitating integration with bundlers like Tailwind or Esbuild.

One of the key features is the potential for CSS scoping using the @scope rule, which allows rules to apply only within specific component boundaries. However, full browser support for @scope is limited at this time. The LiveView team has implemented an opt-in configuration for scoping via a new compile-time setting, but actual scoping functionality remains experimental and not shipped by default.

In addition to CSS features, LiveView 1.2 introduces several smaller enhancements: a new behavior for formatting

You May Also Like

FreeCAD in the Browser

FreeCAD now offers a browser-based version, enabling users to access CAD tools directly online without installing software. Development is ongoing.

Why OpenAI Presence Is A Game-Changer For Artificial Intelligence

OpenAI has introduced Presence, a managed product enabling enterprises to deploy voice and chat AI agents for customer service and internal workflows, currently limited to select clients.

Learn OpenGL, Extensive Tutorial Resource For Learning Modern OpenGL

Learn OpenGL releases a comprehensive tutorial resource for mastering Modern OpenGL, aiming to support developers and students worldwide.

Photo Deduping: Clean Up Safely in Minutes

Transform your photo library in minutes with safe deduplication tips that ensure your memories stay intact—discover how inside.