Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lexer not recognising CSS variables. #1666

carltongibson opened this issue Jan 7, 2021 · 0 comments

Lexer not recognising CSS variables. #1666

carltongibson opened this issue Jan 7, 2021 · 0 comments


Copy link

@carltongibson carltongibson commented Jan 7, 2021

Hi, sorry to open an issue without a suggested fix.

We added an example code block using CSS variables to the Django docs:

.. code-block:: html+django

    {% extends 'admin/base.html' %}

    {% block extrahead %}{{ block.super }}
    :root {
      --primary: #9774d5;
      --secondary: #785cab;
      --link-fg: #7c449b;
      --link-selected-fg: #8f5bb2;
    {% endblock %}

This raises an warning rendering:

django/docs/ref/contrib/admin/index.txt:2815: WARNING: Could not lex literal_block as "html+django". Highlighting skipped.

Looks like it's the -- variables in the <style> element that can't be handled.

Thanks for all your work and efforts! 🏅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants