menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

styled-system

Style props for rapid UI development

Channels
Team

Using Styled-System Theme Variables in a String

July 7, 2020 at 3:47pm

Using Styled-System Theme Variables in a String

July 7, 2020 at 3:47pm
Hello, I was wondering if there was a way I could use my theme variables such as 'neutrals.0' , 'primary.8', etc in the string css properties.
e.g: borderColor: 'transparent black transparent transparent' borderColor: 'transparent neutrals.0 transparent transparent'
the top one works, but the bottom one doesn't. Thanks in advance.

December 12, 2020 at 8:24pm
i wish there was a simple solution for this, i want to use the theme props with calc in some situations and it's so weird that there isn't a very straightforward transform to do