We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tailwind CSS 是一个高度可定制的基础层 CSS 框架,提供一系列的基础工具类,通过工具类的组合完成样式编写
tailwindcss 从 2.0 开始使用了 PostCSS 8,但是 vue-cli 自带的为 PostCSS 7,从而需要安装 tailwindcss的兼容版本
tailwindcss
yarn add tailwindcss@npm:@tailwindcss/postcss7-compat # OR npm install tailwindcss@npm:@tailwindcss/postcss7-compat # 同时 autoprefixer 的版本必须是 `9.x`
tailwind.css
@tailwind base; @tailwind components; @tailwind utilities;
在 main.js 引入 tailwind.css
main.js
根目录创建 postcss.config.js
postcss.config.js
module.exports = { plugins: { tailwindcss: {}, autoprefixer: {} } }
根目录创建 tailwind.config.js 文件
tailwind.config.js
module.exports = { theme: {}, variants: {}, plugins: [] }
配置项说明
Visual Studio Code - Tailwind CSS IntelliSense
@apply
将 @apply 改为单行列出,多次调用
stackoverflow @apply 语法文档
post-css-7-compatibility-build
The text was updated successfully, but these errors were encountered:
No branches or pull requests
在 vue-cli 中使用 tailwindcss
Tailwind CSS 是一个高度可定制的基础层 CSS 框架,提供一系列的基础工具类,通过工具类的组合完成样式编写
说明
tailwindcss
从 2.0 开始使用了 PostCSS 8,但是 vue-cli 自带的为 PostCSS 7,从而需要安装tailwindcss
的兼容版本安装
tailwind.css
在
main.js
引入tailwind.css
根目录创建
postcss.config.js
修改 tailwind 配置项
根目录创建
tailwind.config.js
文件配置项说明
编辑器插件
Visual Studio Code - Tailwind CSS IntelliSense
解决
@apply
语法错误将
@apply
改为单行列出,多次调用stackoverflow
@apply 语法文档
post-css-7-compatibility-build
The text was updated successfully, but these errors were encountered: