@devflow-tools/plugin-css 0.8.9 → 0.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @devflow-tools/plugin-css
2
2
 
3
- CSS expert plugin for DevFlow layout debugging, responsive review, BEM conventions, and performance optimization.
3
+ CSS 专家插件布局调试、响应式审查、BEM 规范、性能优化。
4
4
 
5
5
  ## Installation
6
6
 
@@ -8,12 +8,33 @@ CSS expert plugin for DevFlow — layout debugging, responsive review, BEM conve
8
8
  npm install @devflow-tools/plugin-css
9
9
  ```
10
10
 
11
+ ## MCP Tools
12
+
13
+ | Tool | 说明 | 关键参数 |
14
+ |------|------|---------|
15
+ | `css_audit_selectors` | 审计 CSS 选择器:检测特异性问题、`!important` 滥用、命名规范 | `filePath`, `projectRoot` |
16
+
17
+ ## Knowledge Sources
18
+
19
+ | 来源 | URL | SPA |
20
+ |------|-----|-----|
21
+ | MDN CSS 参考 | https://developer.mozilla.org/en-US/docs/Web/CSS | No |
22
+ | web.dev Learn CSS | https://web.dev/learn/css | No |
23
+
24
+ ## Memory
25
+
26
+ 插件自动注入以下最佳实践:
27
+ - Flexbox/Grid 优先于 float/absolute 定位
28
+ - CSS 变量统一管理主题色和间距
29
+ - 选择器特异性控制(最多 3 级嵌套,避免 `!important`)
30
+ - BEM 命名约定提高可维护性
31
+ - 动画使用 `transform` 和 `opacity`(GPU 加速)
32
+
11
33
  ## Usage
12
34
 
13
35
  ```bash
14
- devflow init
15
- # Then in Claude Code:
16
- # /devflow:css 审查项目中的 CSS 最佳实践
36
+ # 在 Claude Code 中使用
37
+ /devflow:css 审计选择器性能
17
38
  ```
18
39
 
19
40
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devflow-tools/plugin-css",
3
- "version": "0.8.9",
3
+ "version": "0.8.11",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -26,5 +26,5 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "gitHead": "5c9a804d3c2e6e6822b516fde67d5b789dbdb5b3"
29
+ "gitHead": "a0a0b61377aa88ebbd380f50a5d532f63175ef45"
30
30
  }