diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e649340907..f254b95a8415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix generation of `div:not(.foo)` if `.foo` is never defined ([#7815](https://github.com/tailwindlabs/tailwindcss/pull/7815)) - Allow for custom properties in `rgb`, `rgba`, `hsl` and `hsla` colors ([#7933](https://github.com/tailwindlabs/tailwindcss/pull/7933)) - Remove autoprefixer as explicit peer-dependency to avoid invalid warnings in situations where it isn't actually needed ([#7949](https://github.com/tailwindlabs/tailwindcss/pull/7949)) +- Types: allow for arbitrary theme values (for 3rd party plugins) ([#7926](https://github.com/tailwindlabs/tailwindcss/pull/7926)) ### Changed diff --git a/types/config.d.ts b/types/config.d.ts index 97c4dfd9c4f7..b033bc319ef6 100644 --- a/types/config.d.ts +++ b/types/config.d.ts @@ -15,7 +15,7 @@ type ResolvableTo = T | ((utils: PluginUtils) => T) interface PluginUtils { colors: DefaultColors - theme(path: string, defaultValue: unknown): keyof ThemeConfig + theme(path: string, defaultValue?: unknown): any breakpoints, O = I>(arg: I): O rgb(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string hsl(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string @@ -218,6 +218,9 @@ interface ThemeConfig { transitionDuration: ResolvableTo willChange: ResolvableTo content: ResolvableTo + + /** Custom */ + [key: string]: any } // Core plugins related config @@ -320,4 +323,3 @@ interface OptionalConfig { } export type Config = RequiredConfig & Partial -