我试图通过tailwind.config.js扩展编写一些主题来在我的项目中使用 Tailwind 自定义颜色。
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)