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

Improve component style primitives #75

Open
rauanmayemir opened this issue Mar 7, 2019 · 0 comments
Open

Improve component style primitives #75

rauanmayemir opened this issue Mar 7, 2019 · 0 comments
Labels
good first issue Good for newcomers macOS macOS renderer

Comments

@rauanmayemir
Copy link
Member

We currently have styles that are set like border(~width, ~radius, ~color) or margin4(~top, ~left, ~bottom, ~right). This convention proved to be inconvenient because:

  1. This forces us to check which props are set. E.g if we only want to set borderWidth we'll have to mimic 'undefined' behavior for other props
  2. It's not very discoverable. paddingHorizontal or paddingVertical is easier to understand than padding2(~h, ~v, ())
  3. It's harder to compose. `BorderRadius is used for layout calculation, so it looked hacky when we try to pull its value from `Border.

We should split up all the things to be applied individually: paddingLeft(), paddingTop(), borderColor, borderWidth, etc.

@rauanmayemir rauanmayemir added good first issue Good for newcomers macOS macOS renderer labels Mar 7, 2019
@rauanmayemir rauanmayemir mentioned this issue Mar 7, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers macOS macOS renderer
Projects
None yet
Development

No branches or pull requests

1 participant