unknown at rule @apply 在使用windicss时,我们应该都会遇到这个问题。 解决方法: 一、安装Stylelint npm install --save-dev stylelint stylelint-config-standard 二、添加Stylelint配置 创建一个stylelint.config.js文件,内容如下: module.exports = { extends: ["stylelint-config-standard"], rules: { "at...
创建Stylelint 配置 将stylelint.config.js使用以下内容命名的文件放入项目的根文件夹中。 module.exports = {extends: ["stylelint-config-standard"],rules: {"at-rule-no-unknown": [true,{ignoreAtRules: ["tailwind","apply","variants","responsive","screen",],},],"declaration-block-trailing-semico...
@apply text-gray-dark; ^^^ 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":"@apply","description":"Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.","references": [ {"name":"Tailwind Documenta...
Describe the bug there are warning abount tailwind.css rule @apply Reproduction 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 ...
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...
将stylelint.config.js使用以下内容命名的文件放入项目的根文件夹中。 module.exports = {extends: ["stylelint-config-standard"],rules: {"at-rule-no-unknown": [true,{ignoreAtRules: ["tailwind","apply","variants","responsive","screen",],},],"declaration-block-trailing-semicolon": null,"no-...
安装tailwind,以及配置了tailwind css intellisense也无法解决在global.css中报错unknown at rule @tailwind css 这个问题在tailwindcss的官网也有描述 Tailwind CSS uses a lot of custom CSS at-rules like @tailwind, @apply, and @screen, and in many editors this can trigger warnings or errors where these...
该文介绍了如何用css实现未知宽度的正方形,其中一种是利用图片的等比例缩放,另一种是利用padding的...