Skip to main content

CSS properties - Exclude second fallback parameter


Marija_Zidaric

Am curious if there’s an easy way to exclude the second fallback parameter from any css custom properties displayed within the dev inspector? Our dev team will not utilize the fallback values, and is hoping to sync these variables 1:1 with the css custom properties defined within the codebase. We’re aware we can manually edit the variable and exclude the second parameter, but would love if there were a way to make this the default behavior.i.e. we would prefer color: var(--primary-100) over color: var(--primary-100, #f3f3f3) as a default if possible.

3 replies

ksn
Figmate
  • Community Support
  • 1644 replies
  • November 1, 2023

Thanks for this question/feedback @Marija_Zidaric – it looks like someone on the support team was able to reach out to you and let you know that there currently wasn’t a way to achieve this natively, and marked it as a feature request for our engineering team. I’m going to leave this topic under “share feedback” so others can vote on it 😁


I would also really like this feature.

This fallback variable causes development to fail silently: even if the variable is not defined, the UI will still look right.

That is not want you want: if the css variable is not defined, the UI should look wrong so developers can fix the actual problem.


Whatevers
  • New Member
  • 1 reply
  • February 27, 2025

Hoping this feature is in the works and releases soon. No matter how many times I’ve explained to devs why the fallback value should be removed, some inevitably make it into the code. And I get it — expecting devs to manually edit something that claims to be a simple copy/paste makes their work more tedious. It makes their work harder, not easier.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings