3 ms·
Avoided using flexbox up to now and overall it seems pretty great for some layout tasks. I do wonder about the point of the `order` property, would anyone ever
by dismal2 11y ago
Avoided using flexbox up to now and overall it seems pretty great for some layout tasks.
I do wonder about the point of the `order` property, would anyone ever want to mess with this? It seems like something that should absolutely be in your application code, either client-side javascript or server-side. Using it seems like it would make a project harder to maintain and understand.
- deleted 11y ago[deleted]
- jewbacca 11y agore `order`: for a usage you probably hadn't considered, that I'm sure you would agree is purely presentational and not application logic, check out: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes#Holy_Grail_Layout_example https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexibl... tldr: desktop viewport: _header____ nav|article mobile viewport: header article nav can be done really easily with flexbox and `order`.
- dismal2 11y agoAh, makes sense
- grumblestumble 11y agoorder is huge for accessibility. eg, you want to render a sidebar (aside) menu on the left side of the screen, but screen readers should prioritize the actual screen content. Before flexbox, this involved all kinds of nasty positioning tricks, the order property makes it simple as pie.