Search
A “new direction” in the struggle against rightward scrolling
21.5.2020
You know those times you get a horizontal scrollbar when accidentally placing an element off the right edge of the browser window? It might be a menu that slides in or the like. Sometimes we to overflow-x: hidden; on the body to fix that, but that can sometimes wreck stuff like position:...
Notion-Powered Websites
14.5.2020
I’m a big fan of Notion, as you likely know from previous coverage and recent video. It’s always interesting to see what other people do with Notion, and even how Notion uses Notion.
I’d say most usage of Notion is private and internal, but any page on Notion can be totally...
React Single File Components Are Here
13.5.2020
Shawn Wang is talking about RedwoodJS here:
… it is the first time React components are being expressed in a single file format with explicit conventions.
Which is the RedwoodJS idea of Cells. To me, it feels like a slightly cleaner version of how Apollo wants you to do it with useQuery....
How I Put the Scroll Percentage in the Browser Title Bar
12.5.2020
Some nice trickery from Knut Melvær.
Ultimately the trick boils down to figuring out how far you’ve scrolled on the page and changing the title to show it, like:
document.title = `${percent}% ${post.title}`
Knut’s trick assumes React and installing an additional library. I’m sure...
min(), max(), and clamp() are CSS magic!
12.5.2020
Nice video from Kevin Powell. Here are some notes, thoughts, and stuff I learned while watching it. Right when they came out, I was mostly obsessed with font-size usage, but they are just functions, so they can be used anywhere you’d use a number, like a length.
Sometimes pretty basic usage...
Creating a Gauge in React
3.5.2020
You should really look at everything Amelia does, but I get extra excited about her interactive blog posts. Her latest about creating a gauge with SVG in React is unreal. Just the stuff about understanding viewBox is amazing and that’s like 10% of it.
Don’t miss her earlier posts like...
CSS-Tricks Chronicle XXXVIII
30.4.2020
Hey hey, these “chronicle” posts are little roundups of news that I haven’t gotten a chance to link up yet. They are often things that I’ve done off-site, like be a guest on a podcast or online conference. Or it’s news from other projects I work on. Or some other thing...
Innovating on Web Monetization: Coil and Firefox Reality
23.4.2020
I still think Coil is cool. I have it installed on CSS-Tricks as a publisher and money trickles in. I have a paid account and I trickle out money to other sites that use it. I wrote about all that last year.
This’ll explode to something huge if we actually get the Web Monetization API stuff....
Some Typography Links
3.4.2020
I just can’t stop bookmarking great links related to typography. I’m afraid I’m going to have to subject you, yet again, to a bunch of them all grouped up. So those of you that care about web type stuff, enjoy.
I know there are lots of good reasons to be excited about variable...
RSS Stuff
31.3.2020
Laura Kalbag wrote How to read RSS in 2020. This would be a nice place to send someone curious about RSS: what it is, what it’s for, and how you can start using it as a reader. I like this callout, too:
Sometimes the content is just an excerpt, encouraging you to read the rest of the content...
Emergency Website Kit
27.3.2020
Here’s an outstanding idea from Max Böck. He’s created a boilerplate project for building websites that fit within a single HTTP request. This is extremely important for websites that contain critical information for public safety. As Max writes:
In cases of emergency, many organizations need...
Maintaining Performance
27.3.2020
Real talk from Dave:
I, Dave Rupert, a person who cares about web performance, a person who reads web performance blogs, a person who spends lots of hours trying to keep up on best practices, a person who co-hosts a weekly podcast about making websites and speak with web performance professionals…...
15 Things to Improve Your Website Accessibility
17.3.2020
This is a really great list from Bruce. There is a lot of directly actionable stuff here. Send it around to your team and make it something that you all go through together.
Here's a little one that prodded me to finally fix...
Most screen readers allow the user to quickly see a list of links...
Geoff’s Redesign Posts
9.3.2020
I love it when people redesign "in the open" and write about it. I'd just like to shout out to our own Geoff who has been doing this for 3 months now. He started in late December last year. He's been sharing stuff like his dev tooling choices, considering performance, considering accessibility...
Animating CSS Width and Height Without the Squish Effect
6.3.2020
The first rule of animating on the web: don't animate width and height. It forces the browser to recalculate a bunch of stuff and it's slow (or "expensive" as they say). If you can get away with it, animating any transform property is faster (and "cheaper").
Butttt, transform can be tricky. Check...
Vue.js: The Documentary
3.3.2020
Hey how cool! A documentary about Vue! Good timing as it looks like VueConf is happening right now. (Reminder we have a site for conferences to tell you stuff like that).
Sarah appears in it (about 21:13) and talks about CSS-Tricks for a second, so we're officially super famous now and I have...
iOS 13 Design Guidelines, Templates, and Downloads
21.2.2020
Erik Kennedy wrote up a bunch of design advice for designing for the iPhone. Like Apple's Human Interface Guidelines, only illustrated and readable, says Erik.
This is mostly for native iOS apps kinda stuff, but it makes me wonder how much of this is expected when doing a mobile Progressive...
Animate SVG Path Changes in CSS
20.2.2020
Every once in a while I'm motivated to attempt to draw some shapes with <path>, the all-powerful drawing syntax of SVG. I only understand a fragment of what it all can do, but I know enough to be dangerous. All the straight-line syntax commands (like L) are pretty straightforward and I find...
Solving Sticky Hover States with @media (hover: hover)
18.2.2020
Mezo Istvan does a good job of covering the problem and a solution to it in a blog post on Medium¹.
If you tap on something that has a :hover state but you don't leave the page then, on a mobile device, there is a chance that :hover state "sticks." You'll see this with stuff like jump-links used...
Listen to your web pages
16.2.2020
A clever idea from Tom Hicks combining MutationObserver (which can "observe" changes to elements like when their attributes, text, or children change) and the Web Audio API for creating sounds. Plop this code into the console on a page where you'd like to listen to essentially any DOM change...