mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Resolves #15315 It looks like we implemented this in Core but forgot to expose it from the distributed package (the references are only used for testing plugins internally right now). This exposes `flattenColorPalette` under the old import path of `tailwindcss/lib/util/flattenColorPalette`. ## Test Plan Added the following plugin to the Vite example and ensured it works as expected: ```ts import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette' import plugin from 'tailwindcss/plugin' export default plugin(({ matchUtilities, theme }) => { matchUtilities( { 'hover-bg': (value) => { return { '&:hover': { backgroundColor: value, }, } }, }, { values: flattenColorPalette(theme('colors')) }, ) }) ``` <img width="462" alt="Screenshot 2024-12-06 at 11 47 44" src="https://github.com/user-attachments/assets/11163390-053e-4c6e-8cb9-ae67184ad594">