CSS Compliance with Industry Standards

Hi all.
When I deploy a project, weweb does not create a CSS file and style classes, since webflow has this and is considered an industry standard?
My code looks terrible when all the styles are written in every block.

Or am I doing something wrong? I would appreciate any feedback.

You’ll find that component-centric, CSS-in-JS output is pretty common in react and vue-based applications. (Weweb is a vue app generator.) This was a debate 6-7 years ago, but largely the CSS purists lost the fight because it’s just an order of magnitude easier to develop and maintain the codebase this way.

In contrast, static sites tend to silo the CSS, JS and HTML in a manner that is more familiar to someone with a 2008 sensibility about what web app output looks like. This has a lot to do with being style-first rather than code-first. Webflow makes static sites, so that alignment makes more sense. (Sometimes to the aggravation of people suffering through auto-generated combo classes in WF).

Extending beyond your immediate comparison, the tailwind CSS framework is interesting particularly because it separates the CSS to its own file while using a code-scanning precursor to decide which classes to “purge” at compile time. This generates output that is more separated (CSS vs JS) but it is not cascading in the classic B-E-M sense.

Hope some of this helps!

2 Likes

Understand. Thanks.