Search

Nalezeno "page": 412

We need more inclusive web performance metrics


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


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)


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...

The Mad Magazine Fold-In Effect in CSS


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...

My Flywheel Landing Page


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


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


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


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


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


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...

Tackling Authentication With Vue Using RESTful APIs


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


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


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


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


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


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...

Nahoru
Tento web používá k poskytování služeb a analýze návštěvnosti soubory cookie. Používáním tohoto webu s tímto souhlasíte. Další informace