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

[CSS] Remove extra indent for multiline :where, :is and :not selectors #16165

Open
GrimLink opened this issue Mar 26, 2024 · 0 comments
Open
Labels
lang:css/scss/less Issues affecting CSS, Less or SCSS type:bug Issues identifying ugly output, or a defect in the program

Comments

@GrimLink
Copy link

GrimLink commented Mar 26, 2024

Prettier 3.2.5
Playground link

--parser css
--tab-width 4

Input:

:where(input:not([type="button"], [type="reset"], [type="submit"]), textarea, select) {
    /* CSS here */
}

Output:

:where(
        input:not([type="button"], [type="reset"], [type="submit"]),
        textarea,
        select
    ) {
    /* CSS here */
}

Expected output:

:where(
    input:not([type="button"], [type="reset"], [type="submit"]),
    textarea,
    select
) {
    /* CSS here */
}

Why?

The extra indent added when wrapping, the extra indent should not be needed, it makes more sense to format the :where, :is and :not selectors with a single indentation based on the tab-width as shown in the Expected output

@sosukesuzuki sosukesuzuki added type:bug Issues identifying ugly output, or a defect in the program lang:css/scss/less Issues affecting CSS, Less or SCSS labels Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang:css/scss/less Issues affecting CSS, Less or SCSS type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

No branches or pull requests

2 participants