Live data from Hacker News

339 Bytes of Responsive CSS

blog.koley.in

61–70 of 101 posts

Re: 339 Bytes of Responsive CSS

#61
post #5

It's ironic that the author chose to use a page that loads 1.5Mb of data, including 12 separate stylesheets, to write about a minimal stylesheet.

The worst offender is the 1 MB background image that's masked with SVG to create that head icon-thing. There's no reason that should more than ~50k.

Re: 339 Bytes of Responsive CSS

#62
post #31

Earlier quoted context omitted.

I'm curious, how do you plan on styling going forward? Have you had a look at https://tailwindcss.com ? I'm just finishing a large redesign project using tailwind on a Rails/Vue platform and the experience has been great. The idea is that all classes are small, focussed and do one thing only. The downside is that the markup starts to look like 1995 again. The upside is the speed at which you can style a site, and the…

Not parent but going forward I am hopping to get away without using any framework. Approach will be style all basic html elements and just use classes when there's no other way . I feel latest developments in css (especialy grid, flexbox...) make a lot of thing that where really useful before not needed anymore. On the other hand I think this articles are a bit clickbaithy. Yest you can have a very small stylesheet b…

> Approach will be style all basic html elements and just use classes when there's no other way . I feel latest developments in css (especialy grid, flexbox...) make a lot of thing that where really useful before not needed anymore.

Thats the endgame. Style the html elements rather than introducing classes for every frigging thing. Reserve classes for special purposes.

This article was just an introductory piece. I wanted to show that a majority of what non-tech/non-design people perceive about the website can be achieved in a very small amount of CSS.

Re: 339 Bytes of Responsive CSS

#63
post #34
post #5

It's ironic that the author chose to use a page that loads 1.5Mb of data, including 12 separate stylesheets, to write about a minimal stylesheet.

It's 339 bytes of CSS which loads 2.3k of font css which loads 21k of woff2. 23k requiring two round trips (three if the stylesheet is in a separate file, four including the initial HTML load), and to prevent FOUT, the browser won't show any text at all until all the round trips are completed (or it decides it's taking too long and shows the wrong font). Plus you're adding a dependency on Google for no good reason. I…

Bear in mind, the parent is talking about the page where this article is posted, not the CSS itself or the font.

Re: 339 Bytes of Responsive CSS

#64
post #48

Earlier quoted context omitted.

> It becomes hard when you need a grid CSS includes a grid. It works in every current browser.

Sure, but that's only easy if you choose to ignore the 1 in 10 users that it doesn't work for, which is too many for most real world use cases, especially for something as fundamental as the layout of the page.

True. Grid still has a long way to go. Flexbox works as a nice alternative in the meanwhile. However, the semantics of the flex is too confusing and cumbersome.

Re: 339 Bytes of Responsive CSS

#66
post #47
post #42

Earlier quoted context omitted.

Lack of server side modularization of HTML strikes again. It makes no sense that we still have no declarative way of modularizing content apart from using IFRAME. Why can I dynamically load parts and merge it in the DOM via JS but not via a declarative HTML feature?

I would love to have https://w3c.github.io/webcomponents/spec/imports/

Imports would be a boon!

Re: 339 Bytes of Responsive CSS

#68
post #48
post #39

That's nice but really, the problem with css (or what's hard difficult about it) is not designing a single page that has a single column of text with some titles. Any large css files that this is supposed to counter will probable have very similar (and as small) css rules for that same thing. It becomes hard when you need a grid, templates, images, and other more complex designs.

> It becomes hard when you need a grid CSS includes a grid. It works in every current browser.

And that's great for sites who can ignore a significant part of their visitors or simply don't have IE visitors.

Re: 339 Bytes of Responsive CSS

#69

All this CSS minimalism reminds me of Dan Luu's post about Web Bloat: https://danluu.com/web-bloat/ His website is refreshingly light and fast, but that's still no excuse for Times New Roman. Maybe it's a retro irreverence thing.

There's also the site (can't find it anymore, anyone got a link?) that offered a different metric for how bloated your site is: divide the total page weight by the same page's contents rendered into a jpeg.

Re: 339 Bytes of Responsive CSS

#70
post #58

There is a small accessibility problem with the CSS presented on this page. The author set `text-decoration: none;` on the links, relying only on color to identify them. This should be avoided. C.f. https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-st...

Very interesting point. My thoughts were along the lines of "underlined links look bad". I did not realise this could be an accessibility problem.
Post reply on HN