useSetting( 'color' )
does not consider deprecated flag
#37094
Labels
[Package] Block editor
/packages/block-editor
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
useSetting
allows consumers to access data coming fromtheme.json
. For a few cases, we introduced logic to fallback to the corresponding deprecated setting (see), souserSetting( 'color.custom' )
will fallback tosettings.disableCustomColors
ortypography.lineHeight
will fallback tosettings.enableCustomLineHeight
.While this works when accessing the setting directly, it doesn't when the consumer accesses the top-level key:
useSetting( 'color' )
does not consider the special handling forcolor.custom
and so on.The text was updated successfully, but these errors were encountered: