Baltimore-County-Government / dotgov-components

UI design system for Baltimore County's primary website
https://baltimore-county-government.github.io/dotgov-components/
2 stars 0 forks source link

Updates calc property to properly use scss variable #408

Closed bbarbourbcmd closed 2 years ago

bbarbourbcmd commented 2 years ago

I realized that even though the code compiled, I wasn't using the right syntax and the scss variable was not getting compiled.

Original css for quick reference: .dg_leadership-card { ... height: calc(100% - $margin-large); ... }

bbarbourbcmd commented 2 years ago

Yeah, it needs the hashtag. It needs the brackets to work inside of a calc() value and needs the hashtag to be considered valid. It doesn't compile without it.

calc(100% - $margin-large) compiles, but the variable doesn't get converted to a value and calc(100% - {$margin-large}) is invalid and won't compile.