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

Support astroturf #146

Closed
kettanaito opened this issue Apr 9, 2019 · 2 comments
Closed

Support astroturf #146

kettanaito opened this issue Apr 9, 2019 · 2 comments
Labels
enhancement New feature or request needs:discussion Further information is requested needs:tests This issue needs tests. Desperately. scope:styles This issue relates to styling
Milestone

Comments

@kettanaito
Copy link
Owner

kettanaito commented Apr 9, 2019

What:

I suggest to consider support of astroturf.

Why:

  • It's a promising zero runtime CSS-in-JS solution, that a lot of developers can benefit from
  • It has a Component API, just as the one that atomic-layout operates internally

How:

  1. Release stable pluggable styling API
  2. Ship astroturf as one of the possible styles producers:
import styled from 'astroturf'
import Layout from 'atomic-layout'

Layout.configure({
  produceStyles: styled, // api is experimental and subjected to change
})
  1. Write integration test suit for astroturf
@kettanaito kettanaito added enhancement New feature or request needs:tests This issue needs tests. Desperately. scope:styles This issue relates to styling labels Apr 9, 2019
@kettanaito kettanaito added this to the 1.0 milestone Apr 9, 2019
@kettanaito
Copy link
Owner Author

Beware of the downsides when thinking about integrating Astroturf:

It also means we sacrifice:

- A fine-grained style mapping to props. Props map to classes, its all very BEM-y but automated
- Dynamism in sharing values between js and css
- A unified JS-only headspace, you still need to think in terms of JS and CSS

@kettanaito kettanaito added the needs:discussion Further information is requested label Apr 12, 2019
@kettanaito
Copy link
Owner Author

Although the library's core is not dependent on neither rendering nor styling solution, I will postpone any style/rendering-agnostic ideas for now. There are other features to prioritize rather than allowing different CSS-in-JS solution.

styled-components is one of the most commonly used styling libraries, so I don't feel an immediate urge to switch from it, or allow a different solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs:discussion Further information is requested needs:tests This issue needs tests. Desperately. scope:styles This issue relates to styling
Projects
None yet
Development

No branches or pull requests

1 participant