News for hackers. Stuff that matters.
Re:Full-Bleed Layout Using CSS Grid by dmlittle on Monday October 05, 2020 @01:08PM (#24689652)
Since the element you're trying to apply the full-bleed to lives in a container that has a max-width, wouldn't you need to play with negative margins or absolute positioning to accomplish this with only margins?
Re:Full-Bleed Layout Using CSS Grid by enkrs on Monday October 05, 2020 @01:16PM (#24689730)
I guess it's time for bettermotherfuckingwebsite.com gridless version to hit HN :)

This is not really CSS magic:

  main>*{max-width:65ch;margin: 1em auto}
  .full-bleed{width:100%;max-width:none}
Re:Full-Bleed Layout Using CSS Grid by chrismorgan on Monday October 05, 2020 @02:08PM (#24690309)
Here’s an example on my site: https://chrismorgan.info/blog/rust-fizzbuzz/

That’s left-aligned (margin-left: 0; margin-right: 0) rather than centre-aligned (margin-left: auto; margin-right: auto), but it gets the point across. Headings, paragraphs, list items, &c. all get their widths constrained (deliberately to different points, in my case, which wouldn’t work if you were going centre-aligned), but figures can be full-bleed simply by not having that max-width (though in my case they still need negative side margins, but of known values).

Re:Full-Bleed Layout Using CSS Grid by uallo on Monday October 05, 2020 @01:12PM (#24689702)
Don't apply the max-width on the container but on selected children only.