Skip to content

Integrate primitive with any CSS-in-JS library #25

@blakeembrey

Description

@blakeembrey

I'd like to use Evergreen (which uses this library) with my existing CSS-in-JS solution used in a project. This is because the pipeline may already do things like extract to a CSS file, minify output, hydration, style de-duplication, etc.

One approach to solve this nicely is the React.js context API. This library could accept a custom API for working with CSS styles and provide the built-in one as the default value for the context. This would also solve #14, since every render can use a different context.

Let me know if this sounds like a reasonable approach, I'd be happy to take a first stab in a PR. It'd create nice separation for anyone wanting various features on their primitive too, such as vendor prefixing, while not bloating the core in case someone uses different libraries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions