Skip to main content


强大的 CSS 检查器,可以帮助你避免错误并强制执行约定。

¥A mighty CSS linter that helps you avoid errors and enforce conventions.




¥It's mighty as it:

  • 拥有 100 多个现代 CSS 语法和功能的内置规则

    ¥has over 100 built-in rules for modern CSS syntax and features

  • 支持插件,因此你可以创建自己的自定义规则

    ¥supports plugins so you can create your own custom rules

  • 尽可能自动修复问题

    ¥automatically fixes problems where possible

  • 支持你可以创建或扩展的可共享配置

    ¥supports shareable configs that you can create or extend

  • 可以根据你的具体需求进行定制

    ¥can be customized to your exact needs

  • 有 15,000 次单元测试,使其稳健

    ¥has 15k unit tests making it robust

  • 受到 Google 和 GitHub 等全球公司的信任

    ¥is trusted by companies worldwide like Google and GitHub


¥And it can be extended to:

  • 从 HTML、Markdown 和 CSS-in-JS 模板文本中提取嵌入样式

    ¥extract embedded styles from HTML, Markdown and CSS-in-JS template literals

  • 解析类似 CSS 的语言,如 SCSS、Sass、Less 和 SugarSS

    ¥parse CSS-like languages like SCSS, Sass, Less and SugarSS


¥How it'll help you


¥It'll help you avoid errors, for example:

  • 无效的东西,例如 畸形的网格区域

    ¥invalid things, e.g. malformed grid areas

  • 有效的东西,但有问题,例如重复选择器

    ¥valid things that are problematic, e.g. duplicate selectors

  • 未知的东西,例如属性名称拼写错误

    ¥unknown things, e.g. misspelled property names


¥And enforce conventions, for example:

  • 禁止某些东西,例如具体单位

    ¥disallow things, e.g. specific units

  • 强制命名模式,例如对于自定义属性

    ¥enforce naming patterns, e.g. for custom properties

  • 设定限制,例如 ID 选择器的数量

    ¥set limits, e.g. the number of ID selectors

  • 指定符号,例如现代色彩函数

    ¥specify notations, e.g. for modern color functions

我们建议使用像 Prettier 这样的美化打印器和 Stylelint。代码检查器和美化打印器是互补的工具,它们一起工作可以帮助你编写一致且无错误的代码。

¥We recommend using a pretty printer like Prettier alongside Stylelint. Linters and pretty printers are complementary tools that work together to help you write consistent and error-free code.


¥Example output