fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.64k stars 260 forks source link

[Twig] Support CraftCMS css and js blocks #1203

Closed oles closed 1 year ago

oles commented 3 years ago

I'm doing some silly stuff with CraftCMS, and seemingly my best option now is some template generated inline css.

CraftCMS provides some custom Twig functionality, and two of them are tags for css and js;

Example:

{% css %}
    .content {
        color: {{ entry.textColor }};
    }
{% endcss %}

I did not expect web-mode to handle these, but I did some searches to see if there was something I could do.

And I found a similar issue: https://github.com/fxbois/web-mode/issues/805#issuecomment-276258707

If this quite niche thing is within scope as well, I'll try to get a PR rolling!