| 2 | const plugin = require("tailwindcss/plugin"); |
| 3 | |
| 4 | const generateColors = (e, colors, prefix) => |
| 5 | Object.keys(colors).reduce((acc, key) => { |
| 6 | if (typeof colors[key] === "string") { |
| 7 | return { |
| 8 | ...acc, |
| 9 | [`${prefix}-${e(key)}`]: { |
| 10 | "-webkit-text-stroke-color": colors[key], |
| 11 | "-webkit-text-fill-color": "transparent", |
| 12 | }, |
| 13 | }; |
| 14 | } |
| 15 | |
| 16 | const innerColors = generateColors(e, colors[key], `${prefix}-${e(key)}`); |
| 17 | |
| 18 | return { |
| 19 | ...acc, |
| 20 | ...innerColors, |
| 21 | }; |
| 22 | }, {}); |
| 23 | |
| 24 | const generateStrokeWidth = (e, borderWidths, prefix) => |
| 25 | Object.keys(borderWidths).reduce((acc, key) => { |