postcss / postcss-import

PostCSS plugin to inline at-import rules content
MIT License
1.38k stars 115 forks source link

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

Closed borisovcode closed 11 months ago

borisovcode commented 11 months ago

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?

romainmenke commented 11 months ago

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 :

romainmenke commented 11 months ago

This was fixed upstream : https://github.com/buefy/buefy/issues/3912