styled-components / elm-styled

Styling your Html Elements with typed Css 💅
MIT License
180 stars 8 forks source link

CSS calc function #21

Closed ryan-senn closed 6 years ago

ryan-senn commented 6 years ago

EDIT: Whoops I just saw the other post about it, should I delete this one?

Hi,

What is the best way to add the calc function? https://www.w3schools.com/cssref/func_calc.asp

I ended up hacking it this way for my needs, but it would be nice to have it part of the package!

Here is the gist: https://gist.github.com/ryan-senn/4eb350f303b584d5767722c1bafcc7cc

Essentially I hacked together a custom function so that I can set raw css (see line 55).

Cheers, Ryan

k15a commented 6 years ago

Hey Ryan,

There should be a declaration function you can use at the moment. I would like to add the calc function in the future.