Phoenix LiveView 1.2 Released

TL;DR

Phoenix LiveView 1.2 has been officially released, adding support for colocated CSS and several small but impactful improvements. The update simplifies styling in LiveView components and enhances template compilation, though full CSS scoping remains experimental.

Phoenix LiveView 1.2 is now available, introducing colocated CSS support and several improvements to template compilation and JavaScript handling, aimed at enhancing developer experience.

The new release, version 1.2, enables developers to colocate CSS within HEEx templates, leveraging the @scope rule and phx-r attributes to scope styles to specific components. This builds upon existing colocated JavaScript features introduced in LiveView 1.1.

While the framework now supports colocated CSS, full CSS scoping using the @scope rule is not yet included due to limited browser support. Instead, LiveView offers a configurable approach with a custom phx-r attribute and a partial implementation of the @scope rule, allowing early adopters to experiment with scoped styles.

Additional improvements include the ability to customize the formatting of

You May Also Like

The Future of Energy: Renewable Technologies

With renewable energy innovations transforming the future, discover how solar, wind, and storage breakthroughs will shape our energy landscape.

How Blockchain Is Changing the Internet (Beyond Cryptocurrency)

What if blockchain could transform the internet beyond cryptocurrency, unlocking new levels of security, transparency, and trust—discover how it’s reshaping our digital future.

The Next AI Revolution May Be Powered Not by Silicon, but by Light.

Optical technology could revolutionize AI by replacing silicon, promising faster, more efficient data processing—and the future of AI may depend on understanding how light transforms computing.

What Is Telegram Bots

Automate your messaging with Telegram bots, but what unique features make them essential for enhancing your communication experience? Discover more inside!