This change fixes #93 by preventing undefined being set as the colour value when the "Clear" button is pressed in the UI.
It also allows for overwriting of inherited/existing colour values within theme.json, as it forcibly sets the value to an empty string when cleared. In order to get the original value back, you can choose the 'clear all customisations' option from the more menu.
Steps to test
Install themer and twentytwentyfour theme
Navigate to 'Appearance > Styles Editor'
Notice that the site should have colours set by default for background and text
Clear the colours
Notice they update to empty strings and the colour is no longer applied on the frontend
Description
This change fixes #93 by preventing
undefined
being set as the colour value when the "Clear" button is pressed in the UI.It also allows for overwriting of inherited/existing colour values within theme.json, as it forcibly sets the value to an empty string when cleared. In order to get the original value back, you can choose the 'clear all customisations' option from the more menu.
Steps to test
Screenshots/Videos
https://github.com/user-attachments/assets/a0454e1e-ea90-4533-a270-b51a1e738fb4
Checklist: