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

Closed
carltongibson opened this issue Jan 7, 2021 · 0 comments · Fixed by #1633
Closed

Lexer not recognising CSS variables. #1666

carltongibson opened this issue Jan 7, 2021 · 0 comments · Fixed by #1633
Milestone

Comments

@carltongibson
Copy link

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 }}
    <style>
    :root {
      --primary: #9774d5;
      --secondary: #785cab;
      --link-fg: #7c449b;
      --link-selected-fg: #8f5bb2;
    }
    </style>
    {% 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! 🏅

@Anteru Anteru linked a pull request Jan 10, 2021 that will close this issue
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Jan 10, 2021
@Anteru Anteru added this to the 2.7.4 milestone Jan 10, 2021
@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants