Hacker News new | ask | show | jobs
by danpalmer 2790 days ago
I might be a bit out of touch with frontend, but what's the reasoning for this theme being tied to a framework?

I always learnt to keep markup and styles separate as much as possible, because that was beneficial for re-use, maintainability, etc. I would see the JS framework as providing the markup part, so surely the styles should be an orthogonal concern? Would this library not be better as a CSS library that apps can use regardless of the JS (or lack of JS) that they choose to have?

2 comments

The current wave of component-based development is blurring these lines. A Link component can contain the markup, behavior, and styles--presenting a very simple API to the developer.

I find myself taking a hybrid approach these days: common styles and variables (primarily variables) in global SCSS/Stylus stylesheets, and component-specific styles defined in the respective Vue components.

As it turns out, I have very few truly common CSS classes.

EDIT: To address the re-usability aspect as well: this approach absolutely makes it more difficult to re-use styles across other frameworks; but if I'm moving from Vue to some-new-framework, stylesheets are the least of my concerns.

To play devil's advocate, you can release both in a hierarchical structure. There's no reason that the component framework can't import a Sass project for it's styling. Then folks who don't want to use Vue can still make use of the styles.
Absolutely. And a number of projects do exactly that.

Bulma -> Buefy Bootstrap -> VueBootstrap, et al.

That said, if you're already using Vue, then a Vue-based framework is more convenient.

Yes, it should be just a css file.

But how cool is that? A css file. Not as cool and professional as a 'Design System for <frameworkname>'.

Also, in my experience is that once a developer has mastered a framework, they are so proud of it the tie everything to the framework. To pledge their allegiance. And to signal to the pack "Hey, I'm part of the family!".

I'm so tired of seeing this attitude. This isn't about being "cool" this is a visual system for Vue that includes Vue components. Meaning this isn't a collection of styles, these are components that have been styled.

Why do you feel the need to make sweeping generalizations about the author and the author's work? Just shitting on someone/something for the sake of it?