5 ms·
1 line CSS Grid Framework
- yan 17y agoIsn't it a stretch to call this a "framework"? I guess "frameworks" are the "startups" of the CSS world.
- jdp 17y agoIt's definitely a stretch, but most things that are clever are
- enneff 17y agoWhat's so clever about it though? I thought it an obvious approach, and not very useful.
- axod 17y agoIt's only a matter of time before we see a story of a VC funding a "CSS framework startup". After all, we've had bit.ly.
- noodle 17y agoi think it might be meant at least a little tongue-in-cheek.
- jgrahamc 17y ago"The main limit is that you can use only 1,2,4,8,16 columns system plus some combinations like (50% + 25% +25%)." i.e. Tables still win.
- ryanvm 17y agoThat people have to resort to such creative contortions is a testament to what a shit pile CSS is.
- burke 17y agoCSS is perfectly fine for what it was designed for. Unfortunately, when it was being designed, tables were still viewed as perfectly acceptable for layout, and as far as I can tell, CSS didn't really aim to replace it. It seems to me that it was us OCD designers that wanted semantic markup who adopted CSS for layout, where sane people would use tables. (EDIT: I should probably clarify that this is 100% speculation, and based in no way on having read anything published by the W3C or anything like that.) Right now, everything sucks.
- gamache 17y agoNo, CSS is not "perfectly fine for what it was designed for", even if we disregard that it sucks at layout. It's only better than what came before it. It's been over a decade, and we don't even have good layout features or named constants. Of course, CSS's inadequacy is only compounded by the persistent standards noncompliance of certain major web browsers. But call a spade a spade; CSS ain't that great. If it were, we'd all leave tables for tabular data.
- derefr 17y agoWhy doesn't someone just fork Safari or Firefox and put in the thing-that-replaces-CSS parsing they'd like to use? A demo is almost always more convincing, and 99% of browser hacking is standards-compliance—it would take much less effort to blue-sky a new presentation language if it was a prototype for which you were the only user.
- ewiethoff 17y agoThat people have to resort to such creative contortions is a testament to what a pile "Thou shalt not use tables for layout" is.
- bhousel 17y agoTables ain't done 'til IE6 won't run!
- 17y ago
- discojesus 17y ago<table></table> ?
- TweedHeads 17y agoCool hack is cool.
- jrrl 17y agoNeed to change it be based on phi.
- Hexstream 17y agoI thought it was undefined to put block elements in inline elements? You can't put a block element in an inline element but you can put a block element B2 in a block element B1 and then apply display:inline to the B1 element and not get undefined semantics?
- Raphael 17y agofloat sets the display back to block. display: inline is for an IE bug.
- scorxn 17y agoThe point of CSS is to separate presentation from markup. This approach uses a hierarchy of divs to define presentation. If that's alright with you, may as well use tables.
- ajross 17y agoBut in modern AJAX-y Web 2.0 usage, "markup" doesn't even exist as a distinct storage format any more. To the extent that it does, it's stored in wiki or bbcode or some other cooked "markdown" format. HTML exists in the modern world solely as the presentation layer for a data format defined elsewhere. So what's wrong with putting layout in the presentation layer where it belongs? As it happens, our HTML presentation layer also contains this nice, intuitive mechanism for doing layout using "tables" that works better than pretty much anything else has (anyone remember the XmForm layout widget from motif?). So explain again why we can't use them? Sometimes I get the feeling that the CSS layout nuts still think we're living in 1997 and that all web content is written by hand. That's just not how it is any more.
- DougBTX 17y agoJust remember your summary="" attribute and you're golden.
- iron_ball 17y agoHaving started out as a meticulous standards-centric hand-coder with Allaire Homesite, and having slowly moved toward data-driven apps over the years, I thoroughly agree with you. It is worthwhile to write carefully laid out and styled HTML during the template creation phase, but the idea of HTML as data and CSS as presentation does not reflect the everyday reality of MySQL/XML/whatever as data and HTML/CSS as presentation. edited to avoid a rant about CSS itself.
- scorxn 17y agoI'm not saying tables are necessarily wrong. I'm saying that this one-line framework is effectively replacing td's with div's, in that the heirarchy of markup defines the presentation. I don't see what value it adds over tables, given the purpose of CSS.
- erlanger 17y agoI hope I never have to edit layouts coded like this. It would take me back to '99.
- timdorr 17y agoYeah, that's just what I was thinking. Extremely nested div's are as bad or worse than tables.