4 ms·
Somehow it seems roundabout to use computed styles (which aren't human friendly) then to use an LLM to convert that back into something human friendly. Maybe t
by ape4 2y ago
Somehow it seems roundabout to use computed styles (which aren't human friendly) then to use an LLM to convert that back into something human friendly. Maybe that's the only reasonable way.
- alexdanilowicz 2y agoTotally agree with you it feels roundabout. The really challenging part was converting the computed styles to output that is as human-friendly as possible. And what's interesting these days: human-friendly means LLM-friendly... We do a few optimizations to make it as human-friendly as possible. Details in the blog post linked above, but to summarize: 1. We abstract global styles — don't want to include boxSizing: 'border-box' on every div! 2. Remove inherited styles — no need to have styles that are already inherited from the parent. 3. Pull out SVGs — lots of icons on the internet, which can just be their own imports. 4. Condense padding, margin, border to their shorthand properties