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

Simulate Option #261

Closed
limscoder opened this issue May 16, 2017 · 4 comments
Closed

Simulate Option #261

limscoder opened this issue May 16, 2017 · 4 comments

Comments

@limscoder
Copy link

Version: 3.0.x
Environment: Both
Type: Feature


Description

Option for pseudo selectors and media query debugging.

Proposal

Add simulate parameter for debugging pseudo selector and media selector styles.

Similar to glamor's simulate: https://github.com/threepointone/glamor/blob/master/docs/api.md#simulatepseudoclasses

Code Example:

renderer.renderRule(rule, {}, {
  ':hover': true,
  '@media (min-height: 300px)': false
});
const StyledDiv = createComponent(() => {});
const pseudoState = {
  ':hover': true,
  '@media (min-height: 300px)': false
};

<StyleDiv simulate={ pseudoState } />;
@robinweser
Copy link
Owner

robinweser commented May 16, 2017

This will fit perfectly as a plugin. I happily accept a PR and can also give some instructions on how to build it if you want to @limscoder

@limscoder
Copy link
Author

Ok. My team is currently spiking react-fela vs glamorous. If we pick fela, we'll investigate writing a plugin.

@robinweser
Copy link
Owner

Ping me if you need any advice :)

@robinweser
Copy link
Owner

ships with #292

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

No branches or pull requests

2 participants