Skip to content

The inline CSS in PHP files is not linted #807

Closed

Description

@huzaifaalmesbah

#550's coding-standards criterion is unchecked partly because nothing lints the CSS, while @wordpress/scripts already ships stylelint with WordPress's config, so a lint:css script and a CI step are all it takes.

Running it on the stylesheets today finds one problem:

$ npx wp-scripts lint-style "plugins/presence-api/assets/css/*.css"

plugins/presence-api/assets/css/stale-screen.css
  15:2  ✖  Expected empty line before comment  comment-empty-line-before

Tasks

  • lint:css in package.json, running wp-scripts lint-style on plugins/presence-api/assets/css/
  • Fix the one problem above
  • Run it in CI beside lint:js
  • Decide whether the inline CSS in post-list.php, admin-bar.php and the two widget classes moves into stylesheets so it is linted too, or stays inline and unlinted

Part of #550.

Activity

  1. added this to the n.e.x.t milestone on Oct 9, 2026
  2. added
    Needs ReplySomeone outside the maintainers has waited over 48 hours for an answer
    on Oct 11, 2026
  3. i-am-chitti commented on Oct 12, 2026

    @i-am-chitti
    Collaborator

    @josephfusco @huzaifaalmesbah #811 covered everything here except the inline CSS question.

    I'd propose to move it into stylesheets. The four blocks in admin-bar.php, post-list.php and the two widget classes are plain strings with nothing dynamic in them, so they can go into assets/css/ unchanged and get picked up by lint:css.

  4. removed
    Needs ReplySomeone outside the maintainers has waited over 48 hours for an answer
    on Oct 12, 2026
  5. josephfusco commented on Oct 12, 2026

    @josephfusco
    Collaborator

    Agreed, move the four blocks into assets/css/ so lint:css picks them up.

  6. changed the title [-]The CSS is not linted[/-] [+]The inline CSS in PHP files is not linted[/+] on Oct 12, 2026
  7. i-am-chitti commented on Oct 12, 2026

    @i-am-chitti
    Collaborator

    I'm picking this up and moving inline CSS to stylesheets.

  8. modified the milestones: n.e.x.t, 0.18.1 on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Area] InfrastructureIssues for the repository infrastructure[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions