WordPress.org

Make WordPress Core

Opened 21 months ago

Last modified 21 months ago

#42200 new defect (bug)

Code Editor: false error on "@charset"

Reported by: joneiseman Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: close
Focuses: administration Cc:

Description

When I edit style.css in the code editor it reports a false error for the following line:

@charset "UTF-8";

Attachments (1)

charset.png (23.8 KB) - added by joneiseman 21 months ago.

Download all attachments as: .zip

Change History (2)

@joneiseman
21 months ago

#1 @helen
21 months ago

  • Keywords close added

It seems that @charset needs to be the very first element in the stylesheet and not preceded by anything, not even comments: https://developer.mozilla.org/en-US/docs/Web/CSS/@charset

Not sure how that plays out with the way themes need to define headers, but in this case the linter is correct that you have an error.

Note: See TracTickets for help on using tickets.