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

Explicit, framework agnostic, CSS-in-JS support #12

Open
saxoncameron opened this issue Dec 2, 2019 · 0 comments
Open

Explicit, framework agnostic, CSS-in-JS support #12

saxoncameron opened this issue Dec 2, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed will need tests Will require associated unit/integration tests for changed/added behaviour.
Milestone

Comments

@saxoncameron
Copy link

Currently our CSS-in-JS support relies on user's bootstrapping their own implementation using the resolveBp function export. For official support, we'll need to have a proper review of it in practice with popular CSS-in-JS frameworks: at the very least Emotion and Styled Components.

Ideally this comes down to something like just three functions:

  • cq(query, bpName) a.k.a. container query, (also known as bpc) which conditionally returns a CSS block based on the provided query
  • mq(query) a.k.a. media query, which returns a legit CSS media query block

For SCSS support, we might need to add a third mixin for the app container. Really there are three use-cases here overall:

  • Container query
  • App container query (this can be achieved in CSS-in-JS by just passing through the AppBreakpoint bpName)
  • Media query

But for SCSS we'll need to add a third mixin targeting the className injected by the AppContainer to support the above.

@saxoncameron saxoncameron added enhancement New feature or request help wanted Extra attention is needed labels Dec 2, 2019
@saxoncameron saxoncameron added the will need tests Will require associated unit/integration tests for changed/added behaviour. label Dec 20, 2019
@saxoncameron saxoncameron added this to the 1.0.0 milestone Dec 20, 2019
@saxoncameron saxoncameron self-assigned this Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed will need tests Will require associated unit/integration tests for changed/added behaviour.
Projects
None yet
Development

No branches or pull requests

1 participant