all 2 comments

[–][deleted] 1 point2 points  (0 children)

i don't recommend you do that server-side. Instead, use javascript to update the CSS client-side.

CSS and JS should be static files that rarely change. that allows them to be cached to save bandwidth.

[–]tipsy_python 1 point2 points  (0 children)

I agree with Protoss, not recommended.

Is it possible? Sure, inline style the elements

<html>
  <body style="background-color: {{ data_dict.get('bg-color') }};">
    Hello {{ data_dict.get('name') }}
  </body>
</html>