简体   繁体   中英

Get symfony2 client based dynamic CSS working somehow

In my Symfony project, I have a bunch of clients, all having a couple colors.

My forms are setup with color pickers, everything is fine.

But how do I go about using these values in my CSS file, which is handled by assetic?

I've been searching Google, finding a lot of solutions for symfony1, bot not for symfony2.

Does anyone have an idea on a correct approach to this?

(ps: I cannot use LESS in this project)

I do not think you can, or i get you completely....but assuming you want to generate css colors, based on some property field, a user-entity has and is in a database-table, but if these colors are limited, for example user ranks, and each user rank has a color (say up to 20), then you can give every user-rank a special css-class, and have it shown.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM