@devflow-tools/plugin-css 0.8.10 → 0.9.0
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.
- package/README.md +25 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @devflow-tools/plugin-css
|
|
2
2
|
|
|
3
|
-
CSS
|
|
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
|
-
|
|
15
|
-
|
|
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.
|
|
3
|
+
"version": "0.9.0",
|
|
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": "
|
|
29
|
+
"gitHead": "7872bccedbacd09cc92b983f30b3702db6878125"
|
|
30
30
|
}
|