MHN
Add a comment on Hacker News →
3 of 58 comments
  1. Happy to take questions! I built this because I kept hitting the same wall: CSS state resolution is opaque when states overlap, and extending components means mentally re-deriving the whole selector matrix every time.

    Some topics I'm curious what people think about:

    • What’s the one thing this doesn’t cover that you’d expect it to?
    • Does the syntax feel natural to you, or did you find yourself confused by anything?
    • I'm looking for edge cases: what kind of complex selector scenario would trip this compiler up or be impossible to express with this model?

    AMA—happy to answer any questions about the tool, the implementation, or the design choices.

  2. I can agree that CSS is really unpredictable. However ,not being able to put CSS in a file isn't a small change. It makes other people to read the code harder, and mixing css and js just doesn't feel right. But just to keep my self safe, I know how people reacted to react at first. This might be normal in the future. Maybe.

    1. Exactly. And we won't find out if we don't try.
      Also, specifically, this approach is more JSON-based (compared to other CSS-in-JS). So you can easily put styles into a separate file if you want, JS or JSON. But I prefer defining styled components in a separate file, as `styled-components` recommends.