Theme's custom CSS or design tokens disappeared after saving Appearance

What you are seeing

Your site's custom CSS or design tokens have vanished after the Appearance settings were saved.


#Why it happens

Saving the theme replaces the whole thing rather than merging your changes into it. If whatever saved it sent only some of the theme's settings, anything it left out is cleared. That is how custom CSS and design tokens go missing.


#What to do

If you update the theme through the API, always send the complete theme, not just the fields you are changing. Include your custom CSS and design tokens every time, so nothing gets left behind.



Found it? Good.