小编김일혁*_*김일혁的帖子

Tailwind CSS,某些自定义颜色不起作用

我试图通过tailwind.config.js扩展编写一些主题来在我的项目中使用 Tailwind 自定义颜色。

\n
module.exports = {\n  content: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],\n  theme: {\n    extend: {\n      colors: {\n        s2condPurple: '#a32eff',     // works \xe2\xad\x95\xef\xb8\x8f\n        s2condPink: '#ff0099',       // works \xe2\xad\x95\xef\xb8\x8f\n        s2condOrange: '#ff5f55',     // works \xe2\xad\x95\xef\xb8\x8f\n        s2condYellow: '#ffe600',     // doesn't work \xe2\x9d\x8c\n        s2condLime: '#cdff64',       // works \xe2\xad\x95\xef\xb8\x8f\n        s2condMint: '#2af1b5',       // works at 'text-s2condMint' but not at 'border-s2condMint'\n        secondTest: '#ffe600',       // works \xe2\xad\x95\xef\xb8\x8f <-- I tested it for s2condYellow but it works perfectly!\n        s2condTest2: '#2af1b5',      // doesn't work \xe2\x9d\x8c\n        ...\n      },\n      \n    },\n  },\n …
Run Code Online (Sandbox Code Playgroud)

reactjs tailwind-css

23
推荐指数
2
解决办法
3万
查看次数

标签 统计

reactjs ×1

tailwind-css ×1