Skip to content

[FEATURE] Multi-line classes #495

@TonisPiip

Description

@TonisPiip

Using tailwind in django templates, so there's a lot of classes. It's easier to keep them broken into several lines for easier readability.

<a
  href="foo"
  class="
    inline-flex items-center p-4
    bg-white hover:bg-gray-200
    text-sm font-medium text-gray-500 hover:text-gray-700
  ">

Currently djlint will want to put all of the classes into a single massive class string.
Can we get a config rule to not remove class newlines?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions