Skip to content
symfonyPublic

About

Typed atomic CSS for Twig, driven by design tokens and validated at compile time

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Symfony UX CSS

EXPERIMENTAL This bundle is currently experimental and is likely to change, possibly significantly, before its first stable release.

Symfony UX CSS provides a css() Twig function in the spirit of Panda CSS: it turns a hash of style properties into atomic class names, built from your design tokens and validated when templates compile.

Installation

composer require symfony/ux-css

Usage

<div class="{{ css({ p: 'md', color: 'fg', _hover: { color: 'primary' }, md: { p: 'lg' } }) }}">

The attribute becomes class="p_md c_fg hover:c_primary md:p_lg", and the bundle writes the matching rules to var/ux_css/styles.css.

Resources

About

Typed atomic CSS for Twig, driven by design tokens and validated at compile time

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages