I’m sure this library of classes will be useful for somebody. But the stylesheet weighs in at half a megabyte.
First thought: WTF! I had to take a look. It's a case of combinatorial explosion, e.g. there is a style for every integer up to some max I didn't care to find out, for the height: .pxh-558 { height: 558px; } So it's 500kb of unrolled syntax sugar.
Show HN: Blunt – A CSS Layout Framework for Minimalists
71–76 of 76 posts
Re: Show HN: Blunt – A CSS Layout Framework for Minimalists
#72Earlier quoted context omitted.
First thought: WTF! I had to take a look. It's a case of combinatorial explosion, e.g. there is a style for every integer up to some max I didn't care to find out, for the height: .pxh-558 { height: 558px; } So it's 500kb of unrolled syntax sugar.
Yes. I assume he generated the stylesheet programmatically. I guess the intelligent way to use this would be to write some code that detects which classes are actually being used and only include those in a smaller stylesheet.
Re: Show HN: Blunt – A CSS Layout Framework for Minimalists
#73Earlier quoted context omitted.
Yes. I assume he generated the stylesheet programmatically. I guess the intelligent way to use this would be to write some code that detects which classes are actually being used and only include those in a smaller stylesheet.
https://purgecss.com/
Re: Show HN: Blunt – A CSS Layout Framework for Minimalists
#74Earlier quoted context omitted.
Unlearning is harder than learning; highest possible recommendation to start here: https://every-layout.dev and get it right. You'll leapfrog 98% of FE "specialists" and 99.999% of "full-stack" devs.
That does look nice, though the price is pretty off putting. Maybe there'll be more content, maybe there won't be... I wish I was in a position to be able to support projects I wish to see come to fruition at that level, but personally I am not, especially for how little css I write. I do hope it has or gets enough support to keep adding content though, as the level of quality is definitely a step above most free tut…
As for the implementation, it's possible to apply the axiomatic styles to standard HTML (directly, or via React, Vue etc). The examples happen to use web components (custom elements) bc of author preference, I think. I prefer React bc it has a better SSR story and doesn't require JS to be enabled.
As for semantic markup per se (a tangent, given my explanation above), your a11y efforts are waay better spent elsewhere.
Re: Show HN: Blunt – A CSS Layout Framework for Minimalists
#75Earlier quoted context omitted.
https://purgecss.com/
Thanks. I assumed someone somewhere had solved this problem.
I do like to avoid JS toolchains if I can though. Even though I am a webpack aficionado. But if you are going to have a css class for every possible style you might want to use, there is probably no other way.
Re: Show HN: Blunt – A CSS Layout Framework for Minimalists
#76Earlier quoted context omitted.
Thanks. I assumed someone somewhere had solved this problem.
This all feels weird to me. Sort of like anti-compiling! But I guess it works. I do like to avoid JS toolchains if I can though. Even though I am a webpack aficionado. But if you are going to have a css class for every possible style you might want to use, there is probably no other way.