5 ms·
I've been working on a Sketch to HTML/CSS generator that generates production-ready programmer-friendly code. Here's a short demo: https://youtu.be/Yi0BjSM3v4w
by jasim 8y ago
I've been working on a Sketch to HTML/CSS generator that generates production-ready programmer-friendly code.
Here's a short demo: https://youtu.be/Yi0BjSM3v4w https://youtu.be/Yi0BjSM3v4w
It eliminates weeks and months of tedious design to code conversion and you can build sophisticated SaaS applications, content-rich pages, and e-commerce portals much faster.
It might help designers who're interested in understanding how their design translates into code because they can instantly see the underlying code for each design, play around with it, and see how it changes.
- drinchev 8y agoChecked your video and congrats for your effort. As every other tool so far that does try to make visuals into code ( e.g. Dreamweaver style ) I did not expect your tool to be useful for any company-scale use. In your tool an anti pattern that I found was that it seems to use inline styles and css class names of sort 'font-normal' 'text-gray1', etc. That's unmaintainable for large code base. On the other hand having `copy CSS attributes` contextual menu item in Sketch is super productive. I can choose my own class name and whatsoever and still have the exact styles as the designer wanted them to be.
- ajcodez 8y ago> In your tool an anti pattern that I found was that it seems to use inline styles and css class names of sort 'font-normal' 'text-gray1', etc. That's unmaintainable for large code base. Actually lots of companies use micro classes. I first learned about it using Tachyons and built a full compliance platform. It’s good because you don’t need to worry about unintended visual changes and bad because you can’t make large style changes without lots of effort.
- drinchev 8y agoYeah these are out in the wild right now, but having some sort of support for those would be what I would be really looking for. The missing link is the problem. Generated HTML/CSS doesn't know anything about current frameworks / naming conventions / atomic CSS, etc. `text-gray1` means what? Which library am I supposed to use in order to make this stylesheets work? Does it match tachyons or tailwind - no. So I have to add X lines of CSS to my project coming from a tool that I am not able to use once I change a simple class name? Not a good start.
- jasim 8y agoThe code you saw in the video uses Tailwind CSS, which means the code doesn't generate a class for `text-gray1`, but rather, it creates a simple tailwind.confg.js file that lists out all the colors (and every other design scale like typography, spacings etc.). Tailwind uses this config to generate all the functional CSS classes necessary. It is highly suited for building custom UI designs, unlike Bootstrap, Bulma etc. that brings its own styles. The software also can generate BEM like you wish for in the future. One of our earlier iterations did do that, but the default stack today is Tailwind which I've found to be the second best way to approach CSS (the first is CSS-in-JS, but with explicit design scales).
- chrisweekly 8y agoTailwind can be used with CSS-in-JS, to great effect. Emotion is my favorite / recommendation.
- jasim 8y agoThat's really useful to know Chris, thanks!
- chrisweekly 8y agoRight on, Jasim. :) BTW I took a look at your CodeGen project, and I'm impressed.