1,安装stylelint-config-tailwindcss 插件:npm install stylelint-config-tailwindcss --save-dev 2,配置 stylelint setyour stylelint config to: {"extends": ["stylelint-config-recommended",+"stylelint-config-tailwindcss"] }
Update thetailwind.jsonfile {"version":1.1,"atDirectives": [ {"name":"@tailwind","description":"Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.","references": [ {"name":"Tailwind Documentation","url":"https://...
⌘+, 打开配置
Unknown at rule @tailwindcss(unknownAtRules) 截图如下: 解决 原因是css 不知道这条规则提示,如果没有提示警告。 可以屏蔽这条vscode 规则: 在根目录新建.vscode文件夹 文件夹下新建settings.json 文件 添加规则 代码语言:javascript 复制 {"css.lint.unknownAtRules":"ignore"} 保存之后提示没有了:...
install tailwind create a css class use the rule@apply Expected behavior there are not warning System Info System: OS: Linux 4.14 Ubuntu 20.04.6 LTS (Focal Fossa) Container: Yes Shell: 5.8 - /bin/zsh Binaries: Node: 16.20.0 -~/.nvm/versions/node/v16.20.0/bin/node ...
该文介绍了如何用css实现未知宽度的正方形,其中一种是利用图片的等比例缩放,另一种是利用padding的...