Skip to content

Support for styled and multi-line strings? #2

@garretttaco

Description

@garretttaco

My favorite part about emotion (react-emotion) and styled-components is that you can create the element you want and attach the styles to it in one fell swoop. This is extremely convenient and provides a cleaner syntax, helping new developers to pick up the purpose of a component more quickly and contributes to easier maintainability.

Another feature that sort of goes along with styled API is the template literals. This can be interfaced with ReasonML's multiline/interpolation strings {j| $variable |j}. This string can be sent to the Emotion API and handled there, which brings the syntactic benefits of writing actual css in your ReasonML code, Css-in-Re style.

I am sure you (and many others) have thought of this before. I am guessing that the the reason that it not preferred, is that we want our css to be typed and this prevents that from happening. But it just might be worth it for me to get the better syntax.

Thoughts?

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