News for hackers. Stuff that matters.
Re:Utopia, a visual design tool for React, with code as the ... by deanclatworthy on Wednesday June 16, 2021 @02:48AM (#27525604)
Big no for me if styles are injected as inline styles. As a developer I don't want to work with that generated code. At the very least look at using styled components or generate accompanying css module file.
Re:Utopia, a visual design tool for React, with code as the ... by maltenuhn on Wednesday June 16, 2021 @06:05AM (#27526765)
Utopia founder here. Totally with you on this, inline styles are at best a starting point. We already support changing the style target to `css` (styledC / emotion) and the various pseudo states. We also have primitive support for CSS classes.

We started with inline styles because typically that's the starting point when designing / prototyping. A lot of the features on our near-term roadmap are about then abstracting those: "take this element with styles and make it a component", "refactor this manually styled thing with the best matching layout component" etc.

Our design philosophy here is to help you do what you'd do in code (heck, you can even do it in code!), but not make broad assumptions about what that is or should be. Inline styles, helper components, utility css classes, styledComponents all have their place, and it's your job as a designer / engineer to decide on where to use what. What we can do is make those changes as fast as possible, while always showing you the resulting code. No black box, no "smart" decisions.

Re:Utopia, a visual design tool for React, with code as the ... by Kiro on Wednesday June 16, 2021 @06:50AM (#27527011)
What's the problem with inline styles? Just curious. Trying to understand what the difference between styled components and inline styles actually is in this case.
Re:Utopia, a visual design tool for React, with code as the ... by trenchgun on Wednesday June 16, 2021 @04:30AM (#27526214)
Re:Utopia, a visual design tool for React, with code as the ... by trenchgun on Wednesday June 16, 2021 @04:23AM (#27526171)
Yea, optimally it would give these three options as alternatives for user to choose.