How to pass variables from C# MVC 4 to SASS SCSS?

Asked

Viewed 121 times

0

I need to change my CSS files dynamically by pulling some data ,like colors, from the database. I chose to use SASS in the application, but I can import an application variable in MVC 4 to my SCSS file ?

  • could you give a better example? your code? can I try to help.

1 answer

1

You can even use Val to process javascript expressions, but you can’t create dynamic values like this in SASS.
What you can do is create multiple style files and load them dynamically (or use Themes) according to the content of what you recovered from the database.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.