Search
Business Dad
15.1.2020
Congrats to Chris Enns, our podcast editor on ShopTalk and CodePen Radio, for landing a really cool new podcast to edit: Business Dad. It's Alexis Ohanian, the co-founder of Reddit, talking to dads. The first episode is with Hasan Minhaj(!)
Speaking of podcasting, Dave wrote up his thoughts...
A Trick That Makes Drawing SVG Lines Way Easier
14.1.2020
When drawing lines with SVG, you often have a <path> element with a stroke. You set a stroke-dasharray that is as long as the path itself, as well as a stroke-offset that extends so far that you that it's initially hidden. Then you animate the stroke-offset back to 0 so you can watch...
In Defence of “Serverless” —the term
14.1.2020
Ben Ellerby:
For now Serverless, to me at least, manages to do a hard job, defining the borders of a very fluid and complex space of possible solutions in which we can build next-generation architectures. It would help if there was not a framework of the same name, it would help if people didn’t...
Netlify High-Fives
14.1.2020
We've got Netlify as a sponsor around here again this year, which is just fantastic. Big fan. Our own Sarah Drasner is Head of DX (Developer Experience) over there, if you hadn't heard. And if you haven't heard of Netlify, well, you're in for a treat. It's a web host, but for your jamstack sites...
Snowpack
14.1.2020
Snowpack. Love that name. This is the new thing from the Pika people, who are on to something. It's a bundler alternative, in a sense. It runs over packages you pull from npm to make sure that they are ES module-compatible (native imports).
This is how I digest it. When you write a line of code...
Animate Text on Scroll
13.1.2020
We covered the idea of animating curved text not long ago when a fun New York Times article came out. All I did was peek into how they did it and extract the relevant parts to a more isolated demo.
That demo is here:
See the Pen
Selfie Crawl by Chris Coyier (@chriscoyier)
...
A Scandal in Bohemia
13.1.2020
I love that Paravel is so busy doing so much cool stuff they literally just forgot that they built this and are just now releasing it.
It's a Sherlock Holmes story, but designed to be more interesting and immersive (even audio!) than just words-on-a-screen.
Direct Link to Article —...
How to Animate on the Web With Greensock
13.1.2020
There are truly thousands of ways to animate on the web. We’ve covered a comparison of different animation technologies here before. Today, we’re going to dive into a step-by-step guide of one of my favorite ways to get it done: using GreenSock.
(They don’t pay me or anything, I just really enjoy...
Why do we have different programming languages?
13.1.2020
"But why do I have to learn Python?" She wailed, "I like Scratch!"
"I know," I said, "But there are different programming languages for different sorts of tasks."
"That's stupid" she said
I can empathize with the little girl in Terence Eden's story. In high school, I got super into Turbo Pascal....
Re-creating the ‘His Dark Materials’ Logo in CSS
11.1.2020
The text logo has a slash cut through the text. You set two copies on top of one another, cropping both of them with the clip-path property.
What's interesting to me is how many cool design effects require multiple copies of an element to do something cool. To get the extra copy, at least with...
Water.css
11.1.2020
It's notable that Water.css was the #1 clicked thing from Louis Lazaris' Web Tools Weekly in 2019. It's from a 13-year old developer named Felix!
It's just a little bit of CSS you apply to class-free semantic HTML to give it nice basic responsive styles — the perfect kind of thing for a...
CSS-Only Carousel
10.1.2020
It's kind of amazing how far HTML and CSS will take you when building a carousel/slideshow.
Setting some boxes in a horizontal row with flexbox is easy.
Showing only one box at a time with overflow and making it swipable with -webkit-overflow-scrolling is easy.
You can make the "slides" line...
Things you can do with a browser in 2020
10.1.2020
I edit a good amount of technical articles about the web, and there is a tendency for authors to be super broad in their opening sentence, like "What we're able to do on the web has expanded greatly over the years."
I tend to remove stuff like that because it usually doesn't serve the article well...
Is it better to use ems/rems than px for font-size?
10.1.2020
The answer used to be absolutely yes because, if you used px units, you prevented the text from being resized by the user at all.
But browser zoom is the default method for making everything bigger (including text) these days and it works great even if you use px.
But... Kathleen McMahon really...
Our Learning Partner: Frontend Masters
10.1.2020
I'd like to think there is a lot to learn on CSS-Tricks. But we don't really offer much by the way of courses. You're probably reading this because you just generally read this site, and you land on CSS-Tricks otherwise mostly because you are looking for an answer to some front-end...
Understanding Async Await
9.1.2020
When writing code for the web, eventually you'll need to do some process that might take a few moments to complete. JavaScript can't really multitask, so we'll need a way to handle those long-running processes.
Async/Await is a way to handle this type of time-based sequencing. It’s especially great...
let vs. const
9.1.2020
There are multiple ways to declare variables in JavaScript. We had var, and while that still works like it always has, it is generally said that let and const are replacements to the point we rarely (if ever) need var anymore. This doodle explanation does a pretty good job, if you need...
“All these things are quite easy to do, they just need somebody to sit down and just go through the website”
8.1.2020
I saw a video posted on Twitter from Channel 5 News in the UK (I have no idea what the credibility of them is, it's an ocean away from me) with anchor Claudia Liza asking Glen Turner and Kristina Barrick questions about website accessibility.
Apparently, they often post videos with captions,...
Multi-Thumb Sliders: General Case
8.1.2020
The first part of this two-part series detailed how we can get a two-thumb slider. Now we'll look at a general multi-thumb case, but with a different and better technique for creating the fills in between the thumbs. And finally, we'll dive into the how behind the styling a realistic 3D-looking...
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...