styled-system / extras

Legacy packages and experiments
MIT License
18 stars 3 forks source link

add `outline` support #22

Closed peduarte closed 5 years ago

peduarte commented 5 years ago

Yo,

How do you feel about adding outline properties?

They could map to the same theme objects as border.

I use outline often when I don't the border to impact the computed height/width of my elements.

jxnblk commented 5 years ago

FWIW, with @styled-system/css you can use theme.outline to define a scale for properties that aren't explicitly defined – any CSS property should fallback to theme[cssProperty] like this

peduarte commented 5 years ago

My use case is more like outlineColor so it'd be the eq of borderColor, which maps to theme.colors

jxnblk commented 5 years ago

Without any changes to the library, you should be able to alias the colors to theme.outlineColor = theme.colors

peduarte commented 5 years ago

Ohhh cheeky!

Thanks! Will close this and leave it up to you to decide if you wanna add outline or not 👍