Skip to content

Proposal: work around styled-jsx classname attribute bug #64

@dylanjha

Description

@dylanjha

vercel/styled-jsx#647 has been pretty much silent, so it might be worth it for us to workaround that issue ourselves.

The underlying problem is described in #24

TLDR is that custom elements end up getting an attribute classname instead of class.

Can we work around this by doing the following:

  • Observe classname attribute and assign it to the element's class

Are there any downsides or side-effects to doing this? Many, many people are going to run into this. styled-jsx is pretty widely used so we need to fix this in one way or the other otherwise developers are going to really have a BadTime ™️

cc:/ @mmcc -- had this idea when we were chatting

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions