Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Left, right... positioning do not get space from theme #92

Closed
theo-mesnil opened this issue Feb 4, 2020 · 2 comments
Closed

Left, right... positioning do not get space from theme #92

theo-mesnil opened this issue Feb 4, 2020 · 2 comments
Labels

Comments

@theo-mesnil
Copy link
Contributor

🐛 Bug Report

When i add a left, right... on a box with system positioning, i can't get the space from theme.

To Reproduce

const Box = styled.div`
 ${positioning};
`

<Box position="absolute" left="sm" top="sm" />

Expected behavior

Get the space.sm from theme.

## System:
 - OS: macOS 10.15.3
 - CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
 - Memory: 48.82 MB / 8.00 GB
 - Shell: 3.2.57 - /bin/bash
## Binaries:
 - Node: 12.4.0 - ~/.asdf/installs/nodejs/12.4.0/bin/node
 - Yarn: 1.19.1 - ~/.asdf/installs/nodejs/12.4.0/.npm/bin/yarn
 - npm: 6.9.0 - ~/.asdf/installs/nodejs/12.4.0/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman
## npmPackages:
 - @xstyled/styled-components: ^1.15.1 => 1.15.1 
 - @xstyled/system: ^1.15.1 => 1.15.1 
 - styled-components: ^4.0.0 || ^5.0.0 => 5.0.0 
@theo-mesnil theo-mesnil changed the title Left, right... positioning do not get space on theme Left, right... positioning do not get space from theme Feb 4, 2020
@gregberge
Copy link
Collaborator

It is not the bug, it is the behaviour. I plan to change it but it is a breaking change since all existing positioning (top, right, bottom, left) could break.

@gregberge
Copy link
Collaborator

Fixed in v2, inset is a new section in theme to use for top, left, right, bottom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants