Live data from Hacker News

CSS Grid – Table layout is back. Be there and be square

developers.google.com

141–150 of 280 posts

Re: CSS Grid – Table layout is back. Be there and be square

#141

Earlier quoted context omitted.

Since you included the element in your list, something I wish browsers provided is a way to automatically format time elements based on user's preferences. I just want to provide the value in ISO8601, and let the browser take care of it. Luckily, Intl.DateTimeFormat [0] seems to finally allow a reasonable degree of i18n in the browser. If you can live with the limited Safari availability, of course. [0] https://devel…

>something I wish browsers provided is a way to automatically format time elements based on user's preferences That'd quickly get awkward. I live in Norway where the default format is DD/MM as opposed to MM/DD used in the US. This works fine for us in general, we know to expect the first one when we read something in Norwegian and the second one when we read something in English. If a computer formatted a date based…

I'm, for one, completely fine with the last example.

On more serious note, such functionality is meant for formatting freestanding dates/times (eg. contents of table cell labeled "last modified") not dates in flowing text.

Re: CSS Grid – Table layout is back. Be there and be square

#142

Earlier quoted context omitted.

I'm glad someone else said it. I particularly like that they've introduced a new unit, `fr`, and can't even decide what it stands for. I've been writing CSS since about 1996; for some reason, I feel like it all started to go downhill, fast, with the background gradient syntax.

> I feel like it all started to go downhill, fast, with the background gradient syntax I'll take background in CSS over tiled 1px-wide gradient background images any day . The responsibilities being piled to CSS keep increasing, but I believe it is being done in good faith to at improve/formalize what people in the wild are already doing with hacks. Remember DHTML?

Oh I do, I do... and I agree that many of the things CSS does for you today are vastly better than the ad-hoc solutions we had in the past (if you ever have to create an HTML email - and thankfully I am able to outsource all of that sort of work to someone who actually takes a perverse pleasure in it - that's always a nice reminder of how silly HTML and CSS were in the late '90s before CSS was actually broadly usable).

But still... some of the syntax we have now, not to mention the sheer breadth of verbiage, is insane. CSS feels like it's been groaning under the weight of all of this guff for quite some time now, and adding new obscure units and funny things in square brackets isn't really going to improve matters.

Re: CSS Grid – Table layout is back. Be there and be square

#143

Earlier quoted context omitted.

Little irritations like: A form is not allowed to be a child element of a table, tbody or tr. There are workarounds.

? Edit: this is meant to be ironic

You meant it ironically, but people did write things like that. (And it was the only way to get the intended result by the time.)

Re: CSS Grid – Table layout is back. Be there and be square

#144

Earlier quoted context omitted.

I don't know if developers even care about semantic markup anymore, just have your 5 meg of JavaScript squirt out a bundle of divs and to hell with accessibility.

I got tired of this exact thing, so I started making an informational site: http://www.lightentheweb.com/ It's very very not ready yet, but I'd appreciate some pointers or PRs.

You could add http://vanilla-js.com/ ? :D

Re: CSS Grid – Table layout is back. Be there and be square

#145
post #71
post #67

Earlier quoted context omitted.

I think there's a distinction to be made between "web pages" and "web apps". Web pages like news articles and blog posts fit well in the semantic document model of HTML. Web apps extend past this model -- something like DPS would make more sense for them.

I think the lack of such a clear distinction is part of the web's success. For example, is Facebook a web page or a web app?

Well clearly, Facebook "pages" are web pages. They have it in the name, they have static URLs, their own content.

And other parts of Facebook, like the chat, are hard to describe as a page.

Re: CSS Grid – Table layout is back. Be there and be square

#146

Does this include subgrids? As I understand, these are necessary for handling some basic use cases[1], but browser vendors were refusing to implement them? [1] https://blogs.igalia.com/mrego/2016/02/12/subgrids-thinking-...

No, not at this stage.

However `display: contents` may help plaster over the gap.

EDIT, reference: http://gridbyexample.com/video/subgrid-display-contents/

Re: CSS Grid – Table layout is back. Be there and be square

#147

I don't know how to say it politely but what has been achieved by using ad-hoc syntax such as this gem (and similar complex CSS syntax): display: grid; grid-template-rows: 150px [nav-start] auto 100px [nav-end]; grid-template-columns: [header-start] minmax(200px, 3fr) 9fr [header-end]; CSS fans for some reason seem to think that its somehow better to have rendering/presentational properties in an ad-hoc language. Ori…

CSS would have been so simple if it had just adopted a plain LISP syntax. It is so difficult to memorise all the special and inconsistent syntax for every new thingamajig that browser vendors choose to introduce. Need to painfully look up a CSS reference if you haven't used that special rule in more than a week as it just doesn't seem to get retained (at-least for me) into long term memory.

Re: CSS Grid – Table layout is back. Be there and be square

#148
post #116

Earlier quoted context omitted.

It's not a problem in this particular case, as CSS Grid was introduced by Microsoft, in IE10. So, more or less, four years ago. I chuckle when Google announces that Chrome will support this feature as the next big thing, while it was clear years ago that this approach is much better than flexbox. But, I'm glad it finally lands in all browsers.

The version of CSS Grid that's supported by IE isn't the version that's in the standard and supported by all other browsers. Same with Flexbox.

Doesn't autoprefixer solve this?

Re: CSS Grid – Table layout is back. Be there and be square

#149

This is excellent. And with the fast pace of browsers, and the improved habits of users (or automatic updates), it should be available for 95%+ of users within a year (It's in the current Safari Technology Preview, so Safari should get it with the next macOS point update). This is also a good moment to remind people that you don't need Bootstrap and the like as much as you used to. Grids were 90% or the reason people…

Also note that every browser that supports grid also supports @supports: https://developer.mozilla.org/en-US/docs/Web/CSS/@supports

This means that you can start implementing it today for modern browsers, and then remove the old one once you are ready to ditch old browsers.

Re: CSS Grid – Table layout is back. Be there and be square

#150
post #49

This is excellent. And with the fast pace of browsers, and the improved habits of users (or automatic updates), it should be available for 95%+ of users within a year (It's in the current Safari Technology Preview, so Safari should get it with the next macOS point update). This is also a good moment to remind people that you don't need Bootstrap and the like as much as you used to. Grids were 90% or the reason people…

> it should be available for 95%+ of users within a year only if you don't have enterprise customers. Those will continue to run IE11 for the foreseeable future as IE11 will remain supported in Windows 10 until 2025. While Microsoft is pushing Edge as an IE replacement, Edge is still lacking features and looks too different from IE for companies to feel comfortable pushing it to their users without retraining them.

There's a government tool for mandatory testing that everybody in a certificate course must use. A feedback thing.

It only runs under IE7.

How I hate it.

Post reply on HN