Search
A Calendar in Three Lines of CSS
24.12.2020
This article has no byline and is on a website that is even more weirdly specific than this one is, but I appreciate the trick here. A seven-column grid makes for a calendar layout pretty quick. You can let the days (grid items) fall onto it naturally, except kick the first day over to the correct...
Slow Movement
16.12.2020
There was a time when I felt overwhelmed by how fast the web developed. It seemed like not a single day passed without a new plugin, framework, technique, or language feature being released. I believed that in order to survive as a freelancer and to compete with others I had to learn everything...
Horizontal Smooth Scroll Layouts
8.12.2020
Some ideas for horizontal smooth scrolling layouts powered by Locomotive Scroll.
The post Horizontal Smooth Scroll Layouts appeared first on Codrops
How to Get Sticky and Full-Bleed Elements to Play Well Together
4.12.2020
I had a unique requirement the other day: to build a layout with full-bleed elements while one element stays stuck to the top. This ended up being rather tricky to pull off so I’m documenting it here in case anyone needs to re-create this same effect. Part of the trickiness was dealing with logical...
Native CSS Masonry Layout In CSS Grid
1.12.2020
Rachel Andrew introducing the fact that masonry layout is going to be a thing in native CSS via CSS grid layout. The thing with masonry is that we can already do it for the most part, but there is just one thing that makes it hard: doing the vertical-staggering and having a left-to-right source...
The Core Web Vitals hype train
24.11.2020
Some baby bear thinking from Katie Sylor-Miller:
my excitement for Core Web Vitals is tempered with a healthy skepticism. I’m not yet convinced that Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS) are the right metrics that all sites should...
Logical layout enhancements with flow-relative shorthands
16.11.2020
Admission: I’ve never worked on a website that was in anything other than English. I have worked on websites that were translated by other teams, but I didn’t have much to do with it. I do, however, spend a lot of time thinking in terms of block-level and inline-level elements....
Inline Menu Layout with Gallery Panel
11.11.2020
An inline menu layout with a playful hover animation and a gallery content preview panel.
The post Inline Menu Layout with Gallery Panel appeared first on Codrops
Collective #632
2.11.2020
Stories for VSCode * Copying is the way design works * Native CSS Masonry Layout In CSS Grid
The post Collective #632 appeared first on Codrops
In Defense of Tables and Floats in Modern Day Development
30.10.2020
Twenty-plus years ago, tables were the main way web pages were created in HTML. It gave web builders consistent control of constructing pages with some “design.” No longer did sites only have to be top-to-bottom in a linear manner — they could be set up with columns that align left-to-right...
Announcing the 2020 State of CSS Survey
20.10.2020
Last year’s State of CSS Survey yielded interesting results. There’s the quick adoption of features, like calc() and CSS custom properties. There’s also the overwhelming opinion that CSS is fun to write even as we see a growing reliance on CSS-in JS. We also saw some predictable...
Full Bleed
15.10.2020
We’ve covered techniques before for when you want a full-width element within a constrained-width column, like an edge-to-edge image within a narrower column of text. There are loads of techniques.
Perhaps my favorite is this little utility class:
.full-width {
width: 100vw;
position:...
Layoutit Grid: Learning CSS Grid Visually With a Generator
15.10.2020
Layoutit Grid is an interactive open source CSS Grid generator. It lets you draw your designs and see the code as you go. You can interact with the code, add or remove track lines and drag them around to change the sizing — and you get to see the CSS and HTML change in real time!
Add some tracks...
Collective #626
8.10.2020
With Code * CSS Grid full-bleed layout tutorial * Why Tailwind CSS * CSS Variables 101
The post Collective #626 appeared first on Codrops
Achieving Vertical Alignment (Thanks, Subgrid!)
30.9.2020
Our tools for vertical alignment have gotten a lot better as of late. My early days as a website designer involved laying out 960px wide homepage designs and aligning things horizontally across a page using a 12-column grid. Media queries came along which required a serious mental shift. It solved...
Menu to Inner Page Animation with Image Grid Background
16.9.2020
A layout with a menu and background image grid that animates to an inner content page.
The post Menu to Inner Page Animation with Image Grid Background appeared first on Codrops
How to Use CSS Grid for Sticky Headers and Footers
2.9.2020
CSS Grid is a collection of properties designed to make layout easier than it’s ever been. Like anything, there’s a bit of a learning curve, but Grid is honestly fun to work with once you get the hang of it. One area where it shines is dealing with headers and footers. With a little...
Leading-Trim: The Future of Digital Typesetting
21.8.2020
leading-trim is a suggested new CSS property that lets us remove the extra spacing in every font so that we can more predictably style text. Ethan Wang has written about it — including how Microsoft has advocated for it — and that it’s now part of the Inline Layout Module Level 3 spec.
You’d use...
To grid or not to grid
20.8.2020
Sarah Higley does accessibility work and finds that “tables and grids are over-represented in accessibility bugs.”
The drum has been banged a million times: don’t use a <table> for layout. But what goes around comes around. What’s the the #1 item in a list...
Thumbnail to Full Width Image Animation
19.8.2020
An experimental animation where an image goes from thumbnail to full width, allowing for a classy entry to an article view.
The post Thumbnail to Full Width Image Animation appeared first on Codrops