3 ms·
i think your version will break a bunch of common uses of `margin-{left,right}`; e.g. indenting like blockquote { margin-left: 15px; /* ... */ } w
by uryga 6y ago
i think your version will break a bunch of common uses of `margin-{left,right}`; e.g. indenting like
blockquote {
margin-left: 15px;
/* ... */
}
won't work properly (it'll go all the way to the left). i haven't checked, but i think that in the grid version, you'd get an indent as expected.
and i think that's the grid version's main advantage – it doesn't "use up" `margin` and `max-width`, so you're free to use them to style stuff that appears in the body. feels a bit more composable, though at the cost of also feeling massively overcomplicated :/
- FZY0E1RnLM 6y agoThis might be solved by putting the margin on .content and using negative space for full-bleed elements, as in: .content { width: 65ch; margin: 0 auto } .content .full-bleed { width: 100vw; margin-left: calc((65ch - 100vw) / 2); }
- uryga 6y agoyeah, that's the most common way of doing it afaik