generateblocks icon indicating copy to clipboard operation
generateblocks copied to clipboard

Use FSE CSS variables in GB Color Picker

Open diggeddy opened this issue 11 months ago • 0 comments

FSE themes use CSS variables for their colors. And WP will return the variable in the color property for any core blocks. This does not work in GenerateBlocks, where it returns the static variable.

To replicate:

  1. use Twenty24 Theme
  2. add a Group block and Container Block, give them both a background color from the theme pallet
  3. inspect the results.

GB block outputs the the hex color in the bakcground property eg. #b1c5a4 and not the var eg. var(--wp--preset--color--accent-4)

diggeddy avatar Mar 18 '24 10:03 diggeddy