Comments on: Things I’ve Learned About CSS Grid Layout https://css-tricks.com/things-ive-learned-css-grid-layout/ Tips, Tricks, and Techniques on using Cascading Style Sheets. Wed, 20 Mar 2019 22:48:12 +0000 hourly 1 https://wordpress.org/?v=6.1.1 By: IOIIOOIO https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604985 Tue, 15 Nov 2016 17:41:22 +0000 http://css-tricks.com/?p=247172#comment-1604985 I find the inability to change the grid-row-gap insanely frustrating.

The thing is I don’t understand how the solution you mentioned in “The second thing I hate about grid” would help?

I have a codepen here where I would like to decrease the vertical gap between the h1 and the h2 without effecting the gaps for the rest of the grid:

http://codepen.io/IOIIOOIO/pen/dOXENB

Then there’s also the issue of columns getting autofilled even when you don’t want them to. Like here where I want the subheader to only take up columns 2-5… but then it auto fill column 6 on the same row:

]]>
By: Nat Tarnoff https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604905 Tue, 08 Nov 2016 23:35:30 +0000 http://css-tricks.com/?p=247172#comment-1604905 In reply to Nat Tarnoff.

Rachel, I love that people as visible as you are bringing this up. I love that the spec also points it out. We just need to keep working on making that visible since so many developers only read tutorials like this and not the spec. We need to make sure best practices are high and present.

]]>
By: Zane Hannan https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604888 Mon, 07 Nov 2016 22:14:54 +0000 http://css-tricks.com/?p=247172#comment-1604888 In reply to Nat Tarnoff.

As usual, the spec covers this. It’s mainly for visual order as opposed to read order.

So this would be considered an unordered list, I guess.

But anyway, it’s far more annoying than most I’ve seen and shouldn’t even be a thing.

But it looks good

]]>
By: Rachel Andrew https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604887 Mon, 07 Nov 2016 22:02:42 +0000 http://css-tricks.com/?p=247172#comment-1604887 In reply to Nat Tarnoff.

Hi Nat

indeed and the specification warns against using order to change the logical order. I’ve been stressing this point in my presentations about grid over the last 3 years or so, and I’d love other people who write about grid to also be sure to keep this issue in mind.

The same issue is also true in Flexbox, although with grid being two dimensional there is more scope for creating a mess. There are also people more qualified than me looking into this issue, have a look at http://tink.uk/flexbox-the-keyboard-navigation-disconnect/ for example.

]]>
By: Nat Tarnoff https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604882 Mon, 07 Nov 2016 15:24:33 +0000 http://css-tricks.com/?p=247172#comment-1604882 I’m having super deep concerns for accessibility on this. See this sample: http://codepen.io/nattarnoff/full/NbqKrJ/

]]>
By: Emil Björklund https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604850 Fri, 04 Nov 2016 08:07:58 +0000 http://css-tricks.com/?p=247172#comment-1604850 In reply to Emil Björklund.

Well, of course I made a confusing typo in the demo. Silly me. Here’s the updated one.

]]>
By: Emma Arce https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604840 Thu, 03 Nov 2016 12:55:35 +0000 http://css-tricks.com/?p=247172#comment-1604840 Great article, I’m sure I’ll come back and use it as a reference in the near future when I start creating layouts using the CSS Grid Layout.

]]>
By: Emil Björklund https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604838 Thu, 03 Nov 2016 12:21:08 +0000 http://css-tricks.com/?p=247172#comment-1604838 Small/nerdy but important detail around negative line numbers: the negative indexing is only applied to explicit grid lines. For example, if you have a grid that automatically creates rows as needed (which should be a common enough use-case) you cannot create a column that spans the entire height of the grid by positioning it from 1 to -1. The negative indexing only works if the rows were explicitly defined beforehand.

(The reason for this is that negative indexes as a start value can create implicit tracks, which would create an infinite loop of further implicitly created tracks as the item is placed if -1 always referred to the last line.)

Demo

]]>
By: David https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604834 Thu, 03 Nov 2016 10:42:54 +0000 http://css-tricks.com/?p=247172#comment-1604834 Why shouldn’t you use flexbox for page layout? I understand the Jake Archibald article, where the example shows the content growing and shrinking as content is loaded. But if you set the flex-basis on each ‘column’, doesn’t that fix that flickering problem? Maybe this isn’t what flexbox was designed for, but doesn’t it solve the page layout example?

flex-grow: 0;
flex-shrink: 0;
flex-basis: 50%;
]]>
By: Ecphasis infotech https://css-tricks.com/things-ive-learned-css-grid-layout/#comment-1604832 Thu, 03 Nov 2016 09:25:19 +0000 http://css-tricks.com/?p=247172#comment-1604832 As I am a beginner in the service of website designing and website development,its an eye opener post about the grid layout and its associated services.

]]>