theme-specification icon indicating copy to clipboard operation
theme-specification copied to clipboard

Should top/bottom/left/right refer to space theme values?

Open daniellizik opened this issue 6 years ago • 1 comments

Seems like absolutely positioned components are ignoring the values set in space. Is this by design (nothing in the docs)? What is the idiomatic way to write this?

styled.div`
  position: aboslute;
  left: 0; // not css value 0, but 0 index in the theme.space array
  bottom: 0;
`;

Position is an excluded value, I can see why, but I'd like to be able to set the coordinates based on themed space values

daniellizik avatar Oct 17 '19 05:10 daniellizik

Position properties have never used theme.space in Styled System (you can use margin instead), which is probably why it's not currently in this specification, but I think it could make sense to add it here if you want to open a PR

jxnblk avatar Oct 17 '19 14:10 jxnblk