onlook
onlook copied to clipboard
[bug] Deleting bg class from properties UI
When a user deletes a background from the UI sidepanel, actually remove the background class. What happens is the bg class in the tailwind classes gets replaced with bg-[#00000000] which isn't the same as removing the bg entirely.
This is because we're not currently deleting CSS attributes, only updating or overwrite them. You can see the implementation here: https://github.com/onlook-dev/onlook/blob/main/apps/studio/electron/preload/webview/style/index.ts#L79
Implementation recommendation: We should implement a delete pattern wherein you can be given a CSSStyle and remove the key value from the stylesheet. This should also update the update style action with the capability to delete as well.