Live data from Hacker News

A Single Div

a.singlediv.com

101–110 of 146 posts

Re: A Single Div

#101
post #42

I haven't seen so much nay-saying on HN in a while. It's like because there's an artistic element this or it's pure-web tech the appreciation of a cool hack and interesting exploration of a technology is completely gone. This is a classic example of a "hack", pushing CSS slightly beyond what it was intended for and potentially what is practical. But it's beautiful and clever, and if you truly can't appreciate it, tha…

Scanning through the comments, it looks like most of the naysaying was downvoted and the comments about how it's neat floated to the top, including yours.

Then it did its job! When I first came to this thread I felt super sorry for the original author of the page, who most likely didn't post it to HN. Such off-hand, unconstructive cynicism can crush somebody's self-esteem.

Re: A Single Div

#102
post #42

I haven't seen so much nay-saying on HN in a while. It's like because there's an artistic element this or it's pure-web tech the appreciation of a cool hack and interesting exploration of a technology is completely gone. This is a classic example of a "hack", pushing CSS slightly beyond what it was intended for and potentially what is practical. But it's beautiful and clever, and if you truly can't appreciate it, tha…

Scanning through the comments, it looks like most of the naysaying was downvoted and the comments about how it's neat floated to the top, including yours.

People are just tired of all the legacy technologies push. The web should become actually open to new technologies and languages.

Re: A Single Div

#103

Interesting to see CSS coming into it's own. Sure it's not the most practical thing at the moment, but I could certainly see some smaller-scale uses being useful today (like iconography and such). Makes me wonder if we'll begin to see icon/image libraries released with pure css versions.

Considering PNG has been around since 1996 and HTML pages can load arbitrary images and fonts, we don't need pure CSS icons. We have purpose-built formats for images. This CSS image project is just for fun.

The whole "[something] in pure CSS" began when people realized how awful table-based layouts are. First it was layouts, then full-blown designs.

This is almost like the most extreme version of that trend, almost to the point of parody.

Re: A Single Div

#104
post #87

Earlier quoted context omitted.

> But it's beautiful and clever, and if you truly can't appreciate it, that's sad. Interesting. Is it as sad as the fact that one still cannot vertically center a div in CSS without using elaborate hacks?

What constitutes an elaborate hack? You can do it with a hack, but it isn't really elaborate. Put the div in an outer div. The outer div has `display: table-cell` and `vertical-align: middle`.

That's all good and fine unless you also have some requirements about the geometry and behavior of outer div. Then you need to add another div and give it display: table but that interferes with the structure of your document.

Also you might want outer div to fit the space it lies in and height: 100% does not always work.

Basically somewhere around transition from IE to Firefox and from transitional to strict DOCTYPE tables were broken beyond repair for layout purposes. We have not recovered since. Flexbox brings some hope but not necessarily salvation.

Re: A Single Div

#105

Earlier quoted context omitted.

I believe Flexbox, which is supported by most major browsers, allows vertically centering content without hacks: http://philipwalton.github.io/solved-by-flexbox/demos/vertic...

http://caniuse.com/#feat=flexbox Until most IE users upgrade to 11, it's not usable by those of us who can't exclude a large chunk of our users.

has caniuse.com replaced quirksmode now as the canonical source of this kind of information?

Re: A Single Div

#106
post #82
post #67

Earlier quoted context omitted.

I think this kind of thing isn't born out of necessity, since we're locked in with the tech, but more because its a challenging experiment that requires some pretty clever CSS to accomplish. You should certainly not do this in the wild.

I didn't mean that this is done out of necessity , I mean people only give a half-baked mess of standards that is modern web-layout/css the time of day because it's foisted upon us. If CSS were just another layout engine for just another platform, people would laugh it out of the room and not bother with this kind of artistic stunts. CSS does not deserve the kind of respect that would go into this sort of craftmanshi…

Some people like to do things just to see if they can do them. This project is interesting not just because CSS is not meant to do this, but also because CSS is so half baked.

Re: A Single Div

#107
post #16

I am unmoved by the many "... in pure CSS" posts, but I guess they are the equivalent of "HTTP server in x86 assembly" for CSS designers.

I like this, it's neat art. However I must agree that I'm unmoved, I invite anyone who thinks this is particularly clever to visit www.pouet.net for a bit of re-calibration. It's all relative.

I assumed that there were even neater HTML/CSS hacks on that site, but couldn't find them. Are there any? It's pretty hard to navigate the site.

Re: A Single Div

#108
post #105

Earlier quoted context omitted.

http://caniuse.com/#feat=flexbox Until most IE users upgrade to 11, it's not usable by those of us who can't exclude a large chunk of our users.

has caniuse.com replaced quirksmode now as the canonical source of this kind of information?

Yes

Re: A Single Div

#109

Earlier quoted context omitted.

I believe Flexbox, which is supported by most major browsers, allows vertically centering content without hacks: http://philipwalton.github.io/solved-by-flexbox/demos/vertic...

http://caniuse.com/#feat=flexbox Until most IE users upgrade to 11, it's not usable by those of us who can't exclude a large chunk of our users.

yeah, because users will die if content is not cantered strictly vertically in their IE10.

Re: A Single Div

#110
post #87
post #42

I haven't seen so much nay-saying on HN in a while. It's like because there's an artistic element this or it's pure-web tech the appreciation of a cool hack and interesting exploration of a technology is completely gone. This is a classic example of a "hack", pushing CSS slightly beyond what it was intended for and potentially what is practical. But it's beautiful and clever, and if you truly can't appreciate it, tha…

> But it's beautiful and clever, and if you truly can't appreciate it, that's sad. Interesting. Is it as sad as the fact that one still cannot vertically center a div in CSS without using elaborate hacks?

Statements like this remind me of "MySQL does not support transactions".
Post reply on HN