Search
Constrained CSS grids without `max-width`
21.4.2020
Ain’t nothing wrong with max-width, but Ethan makes a point in the last sentence:
Rather than simply defaulting to max-width as a constraint, I can use the empty space around my design, and treat it as a layout tool.
If the space “around” your grid...
Thinking in Behaviors, Not Screen Sizes
11.4.2020
Chase McCoy wrote a nifty post about the “gap problem” when making a grid of items. His argument might be summarized like this: how should we space elements with margins in CSS? He notes that the gap property isn’t quite ready for prime time when it comes to using it with flexbox, like this:
.grid...
A Grid of Logos in Squares
6.4.2020
Let’s build a literal grid of squares, and we’ll put the logos of some magazines centered inside each square. I imagine plenty of you have had to build a logo grid before. You can probably already picture it: an area of a site that lists the donors, sponsors, or that is showing off...
4 CSS Grid Properties (and One Value) for Most of Your Layout Needs
30.3.2020
CSS Grid provides us with a powerful layout system for websites. The CSS-Tricks guide gives you a comprehensive overview of Grid’s properties with layout examples. What we’re going to do here is a reverse approach to show you the smallest possible set of grid properties you need to know to meet...
How to Make Repeating Border Images
16.3.2020
I just saw this cool little site from Max Bittker: broider. You design an image on a 9-slice grid (except the middle part) and it will produce an image for you to use with border-image along with the CSS to copy and paste.
Check out my little design:
CodePen Embed Fallback
The areas of the image...
Careful with Nested `display: grid; height: 100%;`
11.3.2020
It's not every day you can feel CSS be slow at something. Reddit user jgbbrd discovered nesting grid containers that all have 100% height can cause many-seconds of rendering delay. Probably not something you'll ever have to worry about, but still, interesting. From the comments:
What a funny...
Responsive Grid Magazine Layout in Just 20 Lines of CSS
25.2.2020
I was recently working on a modern take of the blogroll. The idea was to offer readers a selection of latest posts from those blogs in a magazine-style layout, instead of just popping a list of our favorite blogs in the sidebar.
The easy part was grabbing a list of posts with excerpts from...
Full-Width Elements By Using Edge-to-Edge Grid
7.2.2020
If you have a limited-width container, say a centered column of text, "breaking out" of that to make a full-width element involves trickery. Perhaps the best trick is the one with left relative positioning and a negative left viewport-based margin. While it has it's caveats (e.g. requiring hidden...
Crafting a Cutout Collage Layout with CSS Grid and Clip-path
5.2.2020
Learn how to code up an interesting design with a cutout image look using CSS Grid and clip-path.
Crafting a Cutout Collage Layout with CSS Grid and Clip-path was written by Briana Camp and published on Codrops
Flexible Captioned Slanted Images
25.1.2020
The end result of Eric Meyer's tutorial on creating this row of slanted images is pretty classy. But it's more about the journey than the destination (there isn't even really an isolated demo for it). Eric does an amazing job at talking it through like a thought process.
We did that recently, only...
The Auto-Flowing Powers of Grid’s Dense Keyword
8.1.2020
Let's say we're working on the homepage of a news website. You're probably used to seeing some card-based content in a grid layout, right? Here's a classic example, The New York Times:
Yeah, something like that.
There are going to be some cards/elements/boxes/whatever that need to take up more...
How to Stack Elements in CSS
6.1.2020
If you want to create fantastic and unique visual experiences on the web, you will eventually need two elements to overlap or exist in the same place. You may even just need them to be positioned near or next to each other. Let's go over two different ways to accomplish this, one with the position...
Collective #577
2.1.2020
Flash Grid * Mix and Jam * IsoCity * MassCode * Everyone has JavaScript, right?
Collective #577 was written by Pedro Botelho and published on Codrops
How to Build Your Resume on npm
2.1.2020
Just yesterday, Ali Churcher shared a neat way to make a resume using a CSS Grid layout. Let’s build off that a bit by creating a template that we can spin up whenever we want using the command line. The cool thing about that is that you’ll be able to run it with just one command.
I know...
New Year, New Job? Let’s Make a Grid-Powered Resume!
1.1.2020
Many popular resume designs are making the most of the available page space by laying sections out in a grid shape. Let’s use CSS Grid to create a layout that looks great when printed and at different screen sizes. That way, we can use the resume online and offline, which might come in handy during...
Authorities in Sichuan Go After Miners to Save Electricity in the Dry Season
28.12.2019
Regional authorities in the province of Sichuan are reportedly pressuring bitcoin miners to scale down operations amid electricity shortages during the dry season in Southwest China. A meeting has been scheduled with regulators, the state run grid operator and mining companies. Two hydropower...
Scroll, Refraction and Shader Effects in Three.js and React
16.12.2019
Discover how to use react-three-fiber and combine some common techniques to create a Three.js powered layout with shader effects.
Scroll, Refraction and Shader Effects in Three.js and React was written by Paul Henschel and published on Codrops
Collective #574
16.12.2019
Happy Hues * JavaScript Visualized * Styled Components, Styled Systems * Raw WebGL * Bravo Studio App
Collective #574 was written by Pedro Botelho and published on Codrops
Adam Argyle’s 2020 CSS Predictions
13.12.2019
I think Adam's first prediction is his boldest, even beyond his Hail Mary prediction. CSS grid is awesome and gap is perhaps one of its best qualities, but gap superseding spacing things out in other ways (e.g. margin) is a bold prediction indeed, especially with Firefox being the only browser...
Russia’s National Energy Grid Operator Tests Blockchain for Retail Payments
11.12.2019
Russia’s national energy grid operator Rosetti, blockchain startup Waves and Alfa Bank are trialing a blockchain solution for electricity payments