3 ms·
> What is SO effing hard about drawing within the screen on web?! It’s because the web’s layout primitives don’t compose well. There’s no easy way to say “this
by tshaddox 5y ago
> What is SO effing hard about drawing within the screen on web?!
It’s because the web’s layout primitives don’t compose well. There’s no easy way to say “this is a full-width container and nothing inside it can go off screen.” As an obvious example, any descendant of that container can use fixed positioning and do whatever it wants. But there are subtler examples that are easier to fall victim to. The way to fix this is to built your own higher-level layout primitives and have conventions or tooling to enforce that you compose them only in approved ways.
- account42 5y ago> There’s no easy way to say “this is a full-width container and nothing inside it can go off screen.” overflow: auto; > As an obvious example, any descendant of that container can use fixed positioning and do whatever it wants. Fixed positioning is you explicitly opting out of composability. > The way to fix this is to built your own higher-level layout primitives and have conventions or tooling to enforce that you compose them only in approved ways. No, the way to fix it is to look at your DOM and CSS instead of adding more abstractions with broken edge cases on top of your abstractions.