Skip to content

[Prettier CSS] Multi-line comma separated selectors #1962

@TheSisb

Description

@TheSisb

I think in terms of legibility, multi-lining comma separated selectors is much more readable. Could this be the default?

Example of desired effect:

.ball, 
.rabbit,
.wrapper:hover .contents,
.wrapper:active .contents {
  color: red;
}

What prettier currently emits:

.ball, .rabbit, .wrapper:hover .contents, .wrapper:active .contents {
  color: red;
}

The single line approach usually ends up creating really long lines that require horizontal scrolling and break n characters per line conventions (usually 80 or 120).

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions