You don't need a grid framework on top of the CSS grid layout
rachelandrew.co.uk
rachelandrew.co.uk
The ability to fully understand the CSS Box Model, and enlighten someone was the pinnacle of your CSS Ninja tactics.
There were the purists who would not write anything but in "Strict Mode". Debates on why "transitional" should be that - transitional. There were moments of triumph when Tantek[3] himself replied to your email, discussing his tan-hacks.
Then, there was my CSS mentor/superhero - Philippe Wittenbergh[4]. I would email him right away to test my work on the Mac browsers, especially with that nasty Internet Explorer for Mac. This was before I was introduced to the Mac in 2006.
Soon enough, writing up a CSS-Grid system for a project became second-nature and felt like ringing the bell. Hell, I even had a dead-simple CSS Grid that got some traction, which I later added to Github and people liked it, used it for a while.
It is such a good feeling that "Grid" is no longer just a CSS terminology to mean a setup of patterns to build a layout but now a keyword in CSS that the browser understands and do something. We have come a long way.
1. I think, the early 21st century - 2001/2003-ish.
2. https://alistapart.com/article/fauxcolumns
Mezzoblue[2] was one of those source of inspiration to CSS enthusiasts.
In my experience the design of a website is often done without a browser in mind at all. A designer uses an application like Sketch or Photoshop to mock up what the site should look like, and once the client has signed off a web designer/developer figures out how to build it in a way that works in all the target browsers. Starting with what the browser can do sounds like a much better approach, but that's going to take a paradigm shift in what both designers do and what clients expect. I can't help but think that's going to limit adoption of 'new browser first' for a long while.
I prefer an uncompromised design and a designer that accepts my feedback and/or that I make adjustments if some design will take an unreasonable amount of time to implement or will have bad performance.
Perhaps a fallback like, oh I dunno, <TABLES>?!
The grid (and flexbox) specifications define how fallbacks should work, making it pretty straightforward to create good - not identical (because what would be the point?) experiences for the browsers you need to support.
So, for example with display: table which generates anonymous boxes, the spec defines that box generation won't happen.
I detailed a bunch of this stuff here: https://rachelandrew.co.uk/css/cheatsheets/grid-fallbacks
The only part of HN that is remotely easy to read on mobile are the homepage/etc list pages, which recently became slightly better to read sometimes (I don't know why but the new mobile-friendly scaling doesn't always kick in).
Those pages have zero need for a table based layout - they're vertical lists of stuff.
The comments threads are honestly terrible to read on mobile.
just wait until someone quotes someone and you have to scroll all the way over here ---->At its most basic, it's just reflowing content to fit the given viewport width.
crumbles[1] into[2] neatly[3] stacked dust[4]
[1] https://www.npmjs.com/package/crumbles
[2] https://github.com/sindresorhus/into-stream
In the past she wrote a CSS grid polyfill [0], but sadly it never got updated to the latest version of the spec. It'd be an easier sell if you could polyfill it reasonably on some older browsers, even if performance suffered a bit.
Right now the last holdout is Edge [1], which is funny because they were the first to ship the older spec, going back as far as IE10 or IE11. Luckily, the next version will be shipping the latest spec.
I've noticed autoprefixer [2] supports a grid option. I'd love a guide that explained any incompatibilities between the two versions. Getting a mostly working grid on IE11 and Edge would probably make it an easier sell for many.
When flexbox started growing popular there were guides showing you could support most features on IE10 and beyond with little effort if you used autoprefixer. Since there are equivalent versions of most attributes on older browsers, you just had to be aware of bugs and gotchas. For example, the default value for flex-grow, flex-shrink, and flex-basis (and their older equivalents) changed between versions, so if you always had to set them. In addition to any incompatibilities between versions, all implementations were buggy, so you had to be aware of bugs and their workarounds. Luckily, they're all well documented on the flexbugs [3] repo.
Considering grid is more complicated than flexbox, I wouldn't be surprised to find it has a few bugs. Does anyone know if there's a gridbugs repo that developers can track?
EDIT: After a quick search, I found a blog post [4] talking about supporting the older version.
[0] https://github.com/FremyCompany/css-grid-polyfill/
[1] http://caniuse.com/#feat=css-grid
[2] https://github.com/postcss/autoprefixer
[3] https://github.com/philipwalton/flexbugs
[4] https://rachelandrew.co.uk/archives/2016/11/26/should-i-try-...
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_La...
I've also bookmarked this article about CSS Grid in production, but haven't read it completely yet: https://www.smashingmagazine.com/2017/06/building-production...
wow, you can say display: grid and display: flex in css? and then flex: 1 1 200px;, grid-row-end: span 2;, grid-column: 1 / -1; What browser support these? Like is it 90% or 50%?
That site is where I keep all by grid demos including a whole series of tutorial videos explaining the spec.
Though its annoying to parse that title
gride framework != css grid layout specs