Hacker News new | ask | show | jobs
by dmix 3337 days ago
This looks nice. I like the name. But poking through the code it seems to be more of a slimmed-down Bootstrap rather than a fresh/new approach to minimalist CSS. Which has it's uses no doubt.

I personally love http://basscss.com/ for a minimal and side-effect free (the real goal) CSS framework, as it has one of the best class naming schemes I've seen.

Each component is focused on doing one thing and one thing well. You basically build up the styles with each class you add to an element. Composed via a combinations of smaller pieces, unix style, rather than complex multi-layered components with deep nesting. Which is an interesting approach when you try to apply the same idea to your own CSS. See the Design Principles for more: http://basscss.com/v7/docs/reference/principles/

The code is also very readable and integrates perfectly with PostCSS. They also have a React version.

3 comments

I liked basscss in principle, but I feel like the following examples from the homepage are missing the point/ will lead to un-maintainable code.

  <h2 class="h1">Larger than default h2 style, but semantically correct</h2>
... why not just use a h1?

I also don't see how

  <p class="bold text-decoration-none caps">Bold</p>
is a big step up from doing

  <p style="font-weight: bold; text-transform: uppercase; text-decoration: none">Bold</p>
Am I missing the appeal here?
> ... why not just use a h1?

Because the HTML tags you choose affect document structure and SEO. CSS classes don't; they only affect aesthetics.

As for the second point, at least how I use it, is that I can create a higher-order class from those "atomic" classes like bold, etc. So I'd do in Sass:

  .paragraph--emphasize {
    @extend .bold, .text-decoration-none, .caps;
  }
Then apply that class on the paragraph. This way, the resulting CSS is very compact: the above gets compiled so that the higher-order class uses the same styles as the atoms that compose it.
> <h2 class="h1">

wow, i just threw up in my mouth

Yea, it should be:

    <h2 class="larger">
or something. Using elements as class names is insane.
Thx for the laugh, as someone pretty css-agnostic I love watching everyone's rather intense opinions on css frameworks.
I'm a big fan of Basscss also; since discovering it a couple years ago, I've almost exclusively used it (a custom fork of it) as the basis for everything I build on the web. It has a logical class naming scheme that easy to remember for me, and keeps things manageable (minimal inheritance) by composing atomic styles to build up higher-order styles. I use it for React applications, but have stuck with the Sass variant, to leverage the library of accumulated themes and "style modules" I've built up over time, which are based on the atomic design principle that Basscss naturally encourages.
I was just building a Jekyll blog and was saddened to see the SASS version of Basscss hasn't been updated in the last year. The maintainer in the docs said that PostCSS is the best way to go, but I was trying to avoid using Node. That might be impossible these days when doing front-end.

Regardless, I know managing OSS is tough but I hope JXNBLK keeps active on the project and other people help him out.

Out curiosity: why are you avoiding node?
I just don't like mixing a ruby static site generator with node. I ultimately just moved to Metalsmith for site generation to use a purely node framework...
Apropos of nothing, but I just migrated a site to metalsmith, and I've really enjoyed the results and ease of building out any functionality that was lacking in the framework (though most needs were met already).
Latest commit ac65174 on 18 Oct 2016. Is it still maintained?
It's in a mature state, already at version 8. Given that it's a minimalist framework this isn't as much of an issue as it would be for Bootstrap or something similar.

This question would have to be answered by https://twitter.com/jxnblk though

Edit: I asked him on Twitter

> I'd consider it feature-complete, but not unmaintained. Most of the open issues are minor and just need to be triaged https://twitter.com/jxnblk/status/860208848359088129