pattern-directory icon indicating copy to clipboard operation
pattern-directory copied to clipboard

Border color isn't respected across blocks

Open annezazu opened this issue 1 year ago • 2 comments

Describe the bug

When trying to set a border, the border color isn't respected. I can replicate across image and columns blocks.

To Reproduce

  1. Add an image.
  2. Open tools panel.
  3. Set a border and set a color.
  4. Notice the color doesn't appear

Expected behavior

I can control border color.

Screenshots

https://github.com/user-attachments/assets/7a990e50-0e8f-4825-abb1-db6de99fe876

annezazu avatar Dec 15 '24 01:12 annezazu

This is due to the fact that none of the custom properties are loaded in the editor window, and for some reason, only when the sides are unlinked, the border-color uses the custom property. On the frontend, the color loads correctly (for the default colors— the "theme" colors should not be visible there, as it's a different theme than the one used by the previewer).

Editor Frontend
Image Image

So there's the larger issue of the Pattern Directory theme "leaking" into the creator — previously there was code to use Twenty Twenty-Three (IIRC) when initializing the creator, but I bet more settings are being loaded async somehow instead of using the config we set. So instead it's loading the Pattern Directory theme, which is causing other issues (#710, #618, etc).

But that doesn't really explain why the custom properties are not set at all… something likely changed with how GB loads assets, so however the pattern creator had been doing it isn't working anymore.

I tried rolling back to 18.7 & 17.9 and I still saw these issues, so this isn't a new regression.

ryelle avatar Dec 17 '24 00:12 ryelle

Theme - TwentyTwenty25 Working Example:

https://github.com/user-attachments/assets/3dfe52ec-e45d-44a6-a466-d9ba7d49d47f

Anuj-Rathore24 avatar Jul 07 '25 13:07 Anuj-Rathore24