Skip to content

Good formatting method recommendation for this tool? #10

@kathesch

Description

@kathesch

Hey, quite new to frontend development, so this might have a quite obvious solution (like some prettier configuration or something), but the default behavior of vscode's html formatter leads to something like this:

<div style="display: grid; grid-template: 1fr / 1fr">
        <style>
            me {
                height: 100px;
            }

            me div {
                background-color: blue;
            }

            me div[n1] {
                background-color: red;
            }
        </style>
        <div>test2</div>
        <div n1>test1</div>
    </div>

This is a little obtrusive compared to tailwind which integrates with html formatters maybe a little better. I was wondering if anyone out there had just found a formatter (ideally with a good out of the box configuration) that simply works well with this. About all I got is adding the following to setting.json...and just kind of being careful that it is styled well. Obviously, just a small QoL, but it'd be nice if there was a ready to go formatting solution that worked with this project.

"html.format.contentUnformatted": "style",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions