csswizardry / ama

Ask me anything!
57 stars 4 forks source link

What do you think about auto-generated styleguides like KSS? #15

Closed nicodeclercq closed 7 years ago

nicodeclercq commented 7 years ago

I love the concept of auto-generated styleguides using KSS or SC5 to rationalize as much as possible the design. For me it permit : to designers to focus on UX and new UI components (not coding the wheel each time they need a new screen) to devs to be more autonomous

This is my personal opinion but I'll be glad to here your thoughts on this subject...

csswizardry commented 7 years ago

Hmm. I have quite conflicted views about this topic… part of me—especially as a developer—loves the idea of automation and code as documentation (i.e. writing your documentation in comments), but then the other part of my has seen this fail time and time again.

It seldom fails because of the tools—the tools are great!—but it fails because developers suck at writing comments/docs. Then all of a sudden you have a styleguide that tells you one thing, but CSS that does another. Your documentation ends up a few versions behind your actual code which leads to a styleguide that is misleading, which is often worse than being non-existent.

One of the most telling things I find is that most of the successful styleguides/toolkits (I’m thinking Origami, Rizzo, Lightning) are products in their own right, with their own roadmaps and backlogs, their own teams, and often their own funding.

Trying to maintain a styleguide as you build the product (through automation or otherwise) relegates it to being a second class citizen, which immediately affects its chances of success 😞

PablitoGS commented 7 years ago

In InfoJobs frontend we use KSS to generate the components guide, as we considered it an excellent tool. Writing the documentation in SCSS it is very convenient and easy to maintain. In my opinion, the importance about writing new code is to keep the documentation, because afterwards it can be used as a component guide by any developer.