Skip to content

CSS @import prettify removes content #2584

@sodik82

Description

@sodik82

I am not sure if this is an issue - but when I am prettify CSS (see playground)

@import "../assets/font/league-gothic/league-gothic.css"
/* css */

.ManagerPage {
  height: 100%;
}

it removes some content that should be kept there (in playground it ends up as @import .ManagerPage;)

The problem is solved when I "properly" use semi-colon, e.g.

@import "../assets/font/league-gothic/league-gothic.css";

.ManagerPage {
  height: 100%;
}

The best solution would be if prettier could add semicolon for the import. Or at least not to discard my content if it can't fix it.

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.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!scope:dependencyIssues that cannot be solved inside Prettier itself, and must be fixed in a dependency

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions