Search
We need more inclusive web performance metrics
10.7.2020
Scott Jehl argues that performance metrics such as First Contentful Paint and Largest Contentful Paint don’t really capture the full picture of everyone’s experience with websites:
These metrics are often touted as measures of usability or meaning, but they are not necessarily meaningful...
Memorize Scroll Position Across Page Loads
9.7.2020
Hakim El Hattab tweeted a really nice little UX enhancement for a static site that includes a scrollable sidebar of navigation.
???? If you've got a static site with a scrollable sidebar, it really helps to memorize the scroll position across page loads.
(left is default, right memorized)...
Posters! (for CSS Flexbox and CSS Grid)
6.7.2020
Any time I chat with a fellow web person and CSS-Tricks comes up in conversation, there is a good chance they’ll say: oh yeah, that guide on CSS flexbox, I use that all the time!
Indeed that page, and it’s cousin the CSS grid guide, are among our top trafficked pages. I try to take...
[článek] Google představil Web Vitals a chystá se hodnotit „page experience“. Co to znamená pro vaše weby?
2.7.2020
[7 minut čtení] K květnu představené Web Vitals jsou podle Googlu nejdůležitější metriky pro posuzování té části uživatelské zkušenosti na webu, která jej zajímá a která je měřitelná zvenčí. Google na konci května oznámil, že pracuje za způsobu posuzování stránek, který více zohlední uživatelský...
The Mad Magazine Fold-In Effect in CSS
25.6.2020
This was always my favorite thing in Mad magazine. One page (the inside of the back cover, I think) was covered in a zany illustration. You folded that page in thirds, covering up the middle-third of that image, and a new image would form because the illustration was designed to perfectly line...
Sweden's Central Bank Releases 98-Page 'Economic Review' Devoted to CBDC
25.6.2020
Sweden's central bank just released a massive report on central bank digital currencies
My Flywheel Landing Page
15.6.2020
Flywheel is my WordPress hosting partner here. I use Local every day for my WordPress local development environment and use their hosting for all my WordPress sites as part of my whole flow, so I’m glad they aren’t just a sponsor but a product I use and like.
Last November some of their...
On Adding IDs to Headers
11.6.2020
Here’s a two-second review. If an element has an ID, you can link to it with natural browser behavior. It’s great if headings have them, because it’s often useful to link directly to a specific section of content.
<h3 id="step-2"Step 2</a
Should I be so inclined, I could...
How to Get All Custom Properties on a Page in JavaScript
8.6.2020
We can use JavaScript to get the value of a CSS custom property. Robin wrote up a detailed explanation about this in Get a CSS Custom Property Value with JavaScript. To review, let’s say we’ve declared a single custom property on the HTML element:
html {
--color-accent: #00eb9b;
}
In JavaScript...
A/B Testing Instant.Page With Netlify and Speedcurve
5.6.2020
Instant.Page does one special thing to make sites faster: it preloads the next page when it’s pretty sure you’re going to click a link (either by hovering over 65ms or mousedown on desktop, or touchstart on mobile), so when you do complete the click (probably a few hundred milliseconds...
Adding CSS to a Page via HTTP Headers
4.6.2020
Only Firefox supports it, but if you return a request with a header like this:
Header add Link "<style.css;rel=stylesheet;media=all"
…that will link to that stylesheet without you having to do it in the HTML. Louis Lazaris digs into it:
[…] the only thing I can think of that could...
On fixed elements and backgrounds
3.6.2020
After just playing with apsect-ratio and being pleasantly surprised at how intuitive it is, here’s an example of CSS acting unintuitively:
If you have a fixed element on your page, which means it doesn’t move when you scroll, you might realise that it no longer acts fixed if you apply a...
Let’s Make One of Those Fancy Scrolling Animations Used on Apple Product Pages
22.5.2020
Apple is well-known for the sleek animations on their product pages. For example, as you scroll down the page products may slide into view, MacBooks fold open and iPhones spin, all while showing off the hardware, demonstrating the software and telling interactive stories of how the products...
Tackling Authentication With Vue Using RESTful APIs
18.5.2020
Authentication (logging in!) is a crucial part of many websites. Let’s look at how to go about it on a site using Vue, in the same way it can be done with any custom back end. Vue can’t actually do authentication all by itself, —we’ll need another service for that, so we’ll be using another service...
CSS fix for 100vh in mobile WebKit
15.5.2020
A surprisingly common response when asking people about things they’d fix about anything in CSS, is to improve the handling of viewport units.
One thing that comes up often is how they relate to scrollbars. For example, if an element is sized to 100vw and stretches edge-to-edge, that’s...
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...
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...
prerender.js
9.5.2020
This is another player in the game of rendering the page of the link that you’re about to click on before you click it. It’s like getting a decent performance boost for extremely little effort.
Instant.page is another one, and I’ve been sufficiently convinced by its methodology...
Phuoc Nguyen’s One Page Wonders
2.5.2020
I keep running across these super useful one page sites, and they keep being by the same person! Like this one with over 100 vanilla JavaScript DOM manipulation recipes, this similar one full of one-liners, and this one with loads of layouts. For that last one, making 91 icons for all those design...
Alpine.js: The JavaScript Framework That’s Used Like jQuery, Written Like Vue, and Inspired by TailwindCSS
29.4.2020
We have big JavaScript frameworks that tons of people already use and like, including React, Vue, Angular, and Svelte. Do we need another JavaScript library? Let’s take a look at Alpine.js and you can decide for yourself. Alpine.js is for developers who aren’t looking to build a single page...