postcss/postcss-import

Ignore comments for "postcss-import: `@charset` must precede all other statements"

borisovcode opened this issue · 2 comments

This is the buefy.css general file

/*! Buefy v0.9.25 | MIT License | github.com/buefy/buefy */
@charset "UTF-8";
.is-noscroll {
  position: fixed;
  overflow-y: hidden;
  width: 100%;
  bottom: 0;
}

postcss-import generate module warning "postcss-import: @charset must precede all other statements"

May be ignore comments?

Hi @borisovcode,

That warning is correct.
@charset must precede everything else.
(not even a single space is allowed before it)

See : https://developer.mozilla.org/en-US/docs/Web/CSS/@charset


Two questions :

  • is there a specific reason you need @charset "UTF-8"; at all?
  • is there a specific reason you need to have this comment before @charset, can it be placed after @charset instead?

This was fixed upstream : buefy/buefy#3912