Live data from Hacker News

CSS: Absolutely positioning things relatively

canvatechblog.com

31–40 of 42 posts

Re: CSS: Absolutely positioning things relatively

#32
post #16
post #15

Earlier quoted context omitted.

Exactly. But we came from using Flex as the defacto system to do layouts and more, now with CSS-Grid it does make sense to use flex for what it was meant for.

I guess it depends on your past experience, but for most of the teams I've been involved in, it was basically a leap from floats to grids for page layout, with flexbox being a small scale option before and after.

Anyone that had to support IE11 probably avoided grid for a long time but could still use flex.

Re: CSS: Absolutely positioning things relatively

#33
post #3

This approach is over-engineered to say the least… You can implement such a layout without using Grid Layout and using just Flex Layout. Also with some min-/max-width tricks you can also completely avoid having media queries in there… For beginners in HTML/CSS this approach is absolutely distracting IMHO.

[deleted]

Re: CSS: Absolutely positioning things relatively

#36
post #24

Earlier quoted context omitted.

Exact same feeling here, everything old is new again when a generation has grown up without experiencing it.

Anyone who has coded an html email is very familiar with tables

Anyone who has coded an HTML email with any sort of complexity probably also hates coding HTML emails.

Re: CSS: Absolutely positioning things relatively

#37
post #10

Flex is becoming more and more irrelevant to do layouts. CSS Grid is really solid and it works well on responsive. The possibilities are endless.

Flex is way simpler to use and reason about, it's sufficient for a majority of cases and it works on IE11, which is still supported until 2025.

Grid is more powerful, but not by a huge margin and not in every case. You can get very far with just flex, calc, media queries, and some inline variables and some other tricks. Also grid needs a more global view so to speak and up-front design as opposed to the component based thinking that has become so prevalent.

I'm a fan of the feature but I don't think flex is becoming irrelevant anytime soon.

Re: CSS: Absolutely positioning things relatively

#39
post #4

Nice technique. Reminds me of the old days of the web, when everything was done with TABLEs.

Venture further into that: grid-template-areas let you visually lay out the elements in the grid, and combined with media queries let you completely rearrange the page as needed.

https://developer.mozilla.org/en-US/docs/Web/CSS/grid-templa...

Re: CSS: Absolutely positioning things relatively

#40
post #16

Earlier quoted context omitted.

I guess it depends on your past experience, but for most of the teams I've been involved in, it was basically a leap from floats to grids for page layout, with flexbox being a small scale option before and after.

Anyone that had to support IE11 probably avoided grid for a long time but could still use flex.

Yes. The more older the project is usually goes with the avoidance of CSS-grid and other features.
Post reply on HN