Layout patterns – Collection of layout patterns built using CSS
web.dev
web.dev
For example, the 'holy grail' layout used to be done using tables. Then we moved away from tables, to using divs with clearfix and other positioning hacks. I lean heavily on flex these days - but they only show grid. I think it would be interesting to see the reason why grid was picked, by comparing it to other methods - so you can show off how clean the implementation is by contrast.
"""
Warning: Your browser does not support CSS container queries. Please open this demo in Chrome Canary with the experimental #enable-container-queries flag turned on.
"""
Can you really call something a "pattern" if it's unavailable or broken to 99.9999% of users?
That said, this looks really useful! I wonder if there are more resources like this? So often with CSS I write layouts from scratch when all I want to do is implement something that should be really common
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_La...
Anyone know alternatives to achieve it without requiring Javascript?
I want to use it for my own website: https://searchableguy.com which is going to get a lot more cards added soon.
Interesting bits here:
Usage of the aspect-ratio property which you cannot use yet, because support is still lacking. (using the padding-bottom trick works fine though!)
And the absolute most amazing CSS feature coming to our browsers soon: Container queries! Cannot fkn wait to use these!
I wish there was way more of this throughout software development.
Some examples:
1. High level sketches for login pages, settings pages, payment pages, etc.
2. Diagrammed patterns for async functionality after a user signs up, such as putting them in a queue, sending a follow up email, etc.
3. Different DB schemas for storing user preferences, stripe information, shopping carts, message queues, etc.
(That you described)
Flexbox is all you need imo
there is nothing broken about simple HTML table for a minimalistic and standards-compliant page, right?