Closed BonaFideIT0 closed 4 months ago
I guess thats due to the fact that the parser does not encounter a style tag beforehand?
That is correct. DjHTML "thinks" it's still in HTML mode, because it hasn't encountered any indication that it isn't. A possible solution would be to introduce something like a {# fmt:css #}
tag to force evaluation in CSS mode. I'll see what I can do!
Much appreciated, thanks. :)
Unfortunately, I have to conclude (again) that supporting a {# fmt:<mode> #}
tag is hard without running into inconsistencies in the InsideHTMLTag
mode. It's the most complicated (read "hacky") mode in DjHTML, but I like the way it currently performs and I don't want to change it.
It is feasible to implement {# fmt:mode #}
inside all modes except that one, though. However, it would not be consistent (read "fair") to support {# fmt:mode #}
in some places and not in others, so I'd rather not support it at all. After all, there already exists {# fmt:off #}
and {# fmt:on #}
as an "escape hatch" for all cases that DjHTML doesn't support.
So, I've decided to also close this issue as wontfix
. My apologies.
Hi Joris,
thanks for your consideration. I think our options are
Considering No. 3 is the cleanest one, we will move forward with that.
I consider your tool a handy way to have consistant styling over a big project with multiple colaborating coders which is unfortunately littered with legacy code.
Besides this issue, it works pretty consistently and we will clean the legacy code up with time and resolve the issue this way.
Thanks again for your good work. :)
A pretty common usecase is to have a base template that looks something like that:
Next we have a template extending this template like so:
After running the hook we get something that looks like this in the extended template:
I guess thats due to the fact that the parser does not encounter a style tag beforehand?
Is there something you can do about that?
Sincere thanks for your work so far. :)