Deleted variables persisting in code after removal: Bug or expected behavior?

I created some variables, and because of the launch of Variable Modes, the variables setup is much cleaner, so some of the old variables were later removed.

However, I find that those deleted variables still stay in the CSS no matter how I re-save or publish. This issue happens to those newly created variables that are not even used as well.

Such deleted variables look like this in the CSS:

:root {
--_sizes---richtext--test\<deleted\|variable-50454f7f-70a9-3a34-58cd-f2d574364c9f\>: 0px;
}

@media screen and (max-width: 991px) {
  body {
    --_sizes---richtext--test\<deleted\|variable-50454f7f-70a9-3a34-58cd-f2d574364c9f\>: 0px;
  }
}

// and in other media queries...

Does this happen to you guys as well? Cached? Any idea?

1 Like

I just found out that Webflow also writes many lines of very old variables I created long ago in such ...\<deleted\... format…

It is generating more and more, which I am 100% sure I have cleaned up already in the Designer.

No reply from support yet.

Update - answer from Webflow support:

Such records that remain in CSS files are so-called “soft delete” of variables. They exist even when such old variables have been completely removed from the project.

So, it is currently an expected behavior. (um…)

They are aware of it and may have a plan to solve later.

1 Like