Enhance your Django development experience with seamless CSS templating support in Visual Studio Code.
- Automatic detection and highlighting of Django template syntax within CSS files
- Syntax highlighting for Django template tags and variables
- Bracket matching and auto-closing for Django template tags
- Maintains full CSS language support and functionality
- Smooth integration with existing Django projects
- Open Visual Studio Code
- Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS)
- Search for "Django CSS Templating"
- Click Install
Alternatively, you can install the extension from the Visual Studio Code Marketplace.
Once installed, the extension automatically activates for CSS files in your Django projects. You can start using Django template syntax in your CSS files right away.
Example:
body {
background-color: {% if is_night %}#000000{% else %}#ffffff{% endif %};
color: {{ text_color }};
font-family: '{{ primary_font }}', sans-serif;
}
.header {
border-bottom: 1px solid {{ border_color }};
}
{% if user.is_authenticated %}
.user-menu {
display: block;
}
{% else %}
.login-button {
display: block;
}
{% endif %}
The extension will highlight Django template tags and variables while preserving standard CSS syntax highlighting.
No additional configuration is required. The extension works out of the box with your existing Django projects.
- Visual Studio Code version 1.93.1 or higher
- A Django project (for full functionality)
Please report any issues or feature requests on our GitHub repository.
We welcome contributions to improve the Django CSS Templating extension. Please see our CONTRIBUTING.md file for details on how to get started.
This project is licensed under the MIT License. See the LICENSE file for details.
Initial release of Django CSS Templating
- Automatic language detection for Django template syntax in CSS files
- Syntax highlighting for Django tags and variables
- Seamless integration with existing CSS functionality
For a full list of changes, please see our CHANGELOG.md.