Open alanhogan opened 13 years ago
Basically, I’m not sure why my CSS is being parsed like templates.
I just hit this problem with minified css as well.
Yep, I got that error too.
I resolved that by moving the #foo
after a class or comma, like this:
@media (rule) {.foo_class{...} #foo_ID{...} }
or
@media (rule) {.foo_class, #foo_ID{...} .other_class{...} }
I resolved that by changing the comment_start_string
option of jinja2.Environment
to {##
, like this:
jinja2_environment = {
'comment_start_string': '{##',
},
This took a long time to figure out…
I was getting this error for some reason:
Turns out, a recent change I made caused my compiled CSS files (I am not compiling using Hyde mechanisms currently, FWIW) to contain the string
{#
. Jinja2 freaked out because it thought it was the beginning of a comment.The above is perfectly valid syntax in CSS; after all, if you are minifying your CSS and it contains an
@media
section that starts with an ID-based selector, then wham:@media something{#foo{...}}
. And you won’t be able tohyde gen -r
anymore.Note that my CSS is within the
content/media/css
directory.