ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

EE doesn't seem to be parsing {snippet} tags inside a template of type stylesheet - I'm guessing because the curly braces conflict with CSS's own braces indicating the start of a style declaration. Is there a way to sort of escape these characters or something?


.style { /* CSS curly brace */
  width: {snippet_width}px; /* EE curly brace */
share|improve this question
up vote 4 down vote accepted

While use cases for it are rare, CSS templates can parse tags if you need them to, but you must link to them with {path='template_group/css_template'} instead of {stylesheet='template_group/css_template}.

share|improve this answer

EE's CSS and JS templates do not parse variables or tags. They're just static templates. Best to avoid EE altogether and just create CSS and JS files on the server. To still be somewhat dynamic, you can always hard-code rules in the <head> (for CSS) or above </body> (for JS). For example:

   .style {
       width: {snippet_width}px;
share|improve this answer
Whether or not CSS templates parse tags depends on how you are linking to them. The point is correct though that in almost all cases, it is best to serve these types of assets as real files on the server. – Derek Jones May 19 '14 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.