Search
Going From Solid to Knockout Text on Scroll
3.2.2021
Here’s a fun CSS trick to show your friends: a large title that switches from a solid color to knockout text as the background image behind it scrolls into place. And we can do it using plain ol’ HTML and …
The post Going From Solid to Knockout Text on Scroll appeared first...
The Web is for More Than Document Viewing
3.2.2021
I poked at a tweet from Ken Kocienda over the weekend:
“Water not wet” reports man standing in ocean. https://t.co/5oUUdWARTU
— Chris Coyier (@chriscoyier) January 31, 2021
I don’t know Ken, so I feel a little bad for being harsh. …
The post The Web is for More Than Document...
I Saw Two Mega Menus Today…
2.2.2021
One was the footer of an (older) U.S. Government website. The other was the navigation for AWS services from the AWS Console.
The post I Saw Two Mega Menus Today… appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter
Dynamically Switching From One HTML Element to Another in Vue
2.2.2021
A friend once contacted me asking if I had a way to dynamically change one HTML element into another within Vue’s template block. For instance, shifting a <div> element to a <span> element based on some criteria. The trick was …
The post Dynamically Switching From One HTML...
“Cancelable” Smooth Scrolling
2.2.2021
Here’s the situation: Your site offers a “scroll back to top” button, and you’ve implemented smooth scrolling. As the page scrolls back to the top, users see something that catches their eye and they want to stop the scrolling, so …
The post “Cancelable”...
Open Web Docs
2.2.2021
Robert Nyman:
Open Web Docs was created to ensure the long-term health of web platform documentation on de facto standard resources like MDN Web Docs, independently of any single vendor or organization. Through full-time staff, community management, and
…
The post Open Web Docs...
Figma Crash Course
1.2.2021
Totally free course from Pablo Stanley. Can’t beat that.
Figma is just blowing up, and for good reason. It’s good software aligned with what digital designers need. It’s fast. It’s on the web, so you can’t lose stuff and …
The post Figma Crash Course appeared...
No-Jank CSS Stripes
1.2.2021
My mind goes immediately to repeating-linear-gradient and hard-stop gradients when thinking of creating stripes in CSS. You make one stripe by using the same color between two color stops, and another stripe (or more) but using a different color …
The post No-Jank CSS Stripes appeared first...
Bulletproof flag components
29.1.2021
A clever use of CSS grid from Jay Freestone to accomplish a particular variation of the media object design pattern (where the image is centered with the title) without any magic numbers anything that isn’t flexible and resiliant.
The trick …
The post Bulletproof flag components...
Styling Web Components
29.1.2021
Nolan Lawson has a little emoji-picker-element that is awfully handy and incredibly easy to use. But considering you’d probably be using it within your own app, it should be style-able so it can incorporated nicely anywhere. How to allow …
The post Styling Web Components appeared first...
GreenSock ScrollTrigger
28.1.2021
High five to the Greensock gang for the ScrollTrigger release. The point of this new plugin is triggering animation when a page scrolls to certain positions, as well as when certain elements are in the viewport. Anything you’d want configurable …
The post GreenSock ScrollTrigger...
A Whole Website in a Single HTML File
28.1.2021
I can’t stop thinking about this site. It looks like a pretty standard fare; a website with links to different pages. Nothing to write home about except that… the whole website is contained within a single HTML file.…
The post A Whole Website in a Single HTML File appeared first...
Components: Server-Side vs. Client-Side
28.1.2021
Building a website in 2021? I’m guessing you’re going to take a component-driven approach. It’s all the chatter these days. React and Vue are everywhere (is Angular still a thing?), while other emerging frameworks continue to attempt a push …
The post Components: Server-Side vs. Client-Side...
Embedding an Interactive Analytics Component with Cumul.io and Any Web Framework
28.1.2021
In this article, we explain how to build an integrated and interactive data visualization layer into an application with Cumul.io. To do so, we’ve built a demo application that visualizes Spotify Playlist analytics! We use Cumul.io as our interactive …
The post Embedding an Interactive...
The Holy Grail Layout with CSS Grid
27.1.2021
How to build a very common layout with CSS grid. Header on the top, footer on the bottom. Two columns, sidebar and main content. This one has navigation above the main content but within that same column.
The post The Holy Grail Layout with CSS Grid appeared first on CSS-Tricks.
You can support...
Monorepo
26.1.2021
I’m not exactly a large-scale DevOps guy, but I can tell ya we’ve been moving back toward a monorepo at CodePen and it’s rife with advantages over a system with lots of smaller repos. For us, I mean. It’s …
The post Monorepo appeared first on CSS-Tricks.
You...
Re-Creating the Porky Pig Animation from Looney Tunes in CSS
26.1.2021
You know, Porky Pig coming out of those red rings announcing the end of a Looney Tunes cartoon. We’ll get there, but first we need to cover some CSS concepts.
Everything in CSS is a box, or rectangle. Rectangles …
The post Re-Creating the Porky Pig Animation from Looney Tunes in CSS appeared...
Tech Stacks and Website Longevity
25.1.2021
Steren Giannini in “My stack will outlive yours”:
My stack requires no maintenance, has perfect Lighthouse scores, will never have any security vulnerability, is based on open standards, is portable, has an instant dev loop, has no build step
…
The post Tech Stacks and Website...
Checkerboard Reveal
25.1.2021
Back when I was 10, I remember my cousin visiting our house. He was (and still is) a cool kid, the kind who’d bring his own self-programmed chess game on a floppy disk. And his version of chess was …
The post Checkerboard Reveal appeared first on CSS-Tricks.
You can support CSS-Tricks...
You want minmax(10px, 1fr) not 1fr
22.1.2021
There are a lot of grids on the web like this:
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
My message is that what they really should be is:
.grid {
display: grid;
grid-template-columns: repeat(3, minmax(10px, 1fr));
}
Why? In …
The post You want minmax(10px, 1fr)...