gulp-concat-css icon indicating copy to clipboard operation
gulp-concat-css copied to clipboard

Keep @charset on top.

Open Treora opened this issue 8 years ago • 0 comments
trafficstars

The @charset at-rule "must be the first element in the style sheet and not be preceded by any character" (see MDN).

If different files have different charsets, things could get complicated; I have not looked how this is handled currently. If they are all the same, they could be deduplicated, or just left the same: "If several @charset at-rules are defined, only the first one is used".

A quick half-fix would be to keep the @charsets in their places (so the one of the first file is used, the rest is invalid), but insert the @import statements just below the first one, rather than above.

Treora avatar Jul 12 '17 17:07 Treora