Unknown at rule @apply css(unknownAtRules) } } 1. 2. 3. 4. 5. 6. 7. 解决方法: 在根目录 .vscode 文件夹下 .vscode/settings.json 添加 "css.customData": [".vscode/tailwindcss.json"] 1. 创建.vscode/tailwindcss.json { "version": 1.1, "atDirectives": [ { "name": "@tailwind",...
⌘+, 打开配置
Unknown at rule @tailwindcss(unknownAtRules) 截图如下: 解决 原因是css 不知道这条规则提示,如果没有提示警告。 可以屏蔽这条vscode 规则: 在根目录新建.vscode文件夹 文件夹下新建settings.json 文件 添加规则 代码语言:javascript 复制 {"css.lint.unknownAtRules":"ignore"} 保存之后提示没有了:...
Tailwind CSS 是一款 Units 導向的 CSS 框架,它的許多優勢讓大家趨之若鶩的學習與瞭解,但是在 VSCode 開發上時常會遇到 Unknown at rule @tailwind、Unknown at rule @apply 等錯誤訊息,所以這一篇來紀錄一下解決方式。 前言 Tailwind CSS 是一款 Units 導向的 CSS 框架,它的許多優勢讓大家趨之若鶩的學習與瞭...
@tailwindbase;^^^Unknown at rule @tailwindcss(unknownAtRules) ./styles/globals.css @layerbase{*{@applytext-gray-dark;^^^Unknown at rule @applycss(unknownAtRules)}} VSCode Solution: Define Custom Data for CSS The solution was toload a custom CSS datasetfor Tailwind directives in a workspace...
If you are using TailwindCSS in your project, you have probably already encountered the warning messageUnknown at rule @tailwind. If you use VSCode, you can see the wavy underline in the CSS file and the warning list in theProblemstab. ...
三、安装Stylelint、Tailwind CSS IntelliSense扩展 四、修改VSCode的settings.json文件 1、打开设置 2、编辑settings.json 3、禁用CSS内置验证 "css.validate": false, "less.validate": false, "scss.validate": false, 效果如下: 最后重启VSCode,@apply上面的警告应该消失了。
{"name":"Tailwind Documentation","url":"https://tailwindcss.com/docs/functions-and-directives#variants"} ] } ] } Credits: Article by Duncan Leung @SeyyedKhandon HISTORY For anyone in the future, if you are working in VSCode, you need to disable the lint rule ofunknownAtRules. ...
该文介绍了如何用css实现未知宽度的正方形,其中一种是利用图片的等比例缩放,另一种是利用padding的...
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 ...