Caching Data in SvelteKit | CSS-Tricks

My previous post was a broad overview of SvelteKit where we saw what a great tool it is for web development. This post will fork off what we did there and dive into every developer’s favorite topic: caching. So, be sure to give my last post a read if you haven’t already. The code for this post is available on GitHub, as well as a live demo. This post is

Read More

Archives | Digging Into WordPress

Welcome to the Archives! Here you’ll find just about everything that’s available here at DigWP.com. To find some helpful articles and tutorials, try the dynamic menu to drill down and find the good stuff. Let us know if we missed anything, or need help finding something specific. Dynamic Menu Month: Choose a month.. January 2023 December 2022 November 2022 September 2022 July 2022 January 2022 September 2021 August 2021 April

Read More

Stay Logged in to WordPress

I work from home so can afford to leave tabs open for each of my WordPress sites. That way I can jump on anytime and update or add new content very quickly. The problem I kept running into is that WordPress automatically logs out users after 48 hours. Which means I have to log back in every day even when it’s not necessary. So I needed a way to stay

Read More

How to Disable Embeds for Any Specific URLs

Quick tip: how to disable embeds for any URL(s). The other day I was adding URLs to a draft post in WordPress. Some of the URLs were for Twitter tweets. Checking a preview of the post on the front end, I was surprised that WordPress had automatically embedded the actual tweet in place of the URL. After a few minutes searching for a way to disable the automatic embedded tweet,

Read More

AR, VR, and a Model for 3D in HTML | CSS-Tricks

Tucked down somewhere in the Safari Technology Preview 161 release notes is a seemingly innocous line about support for a new HTML element and attribute: Added support for <model src> and honor <source type> attributes ([email protected]) Anytime I see mention of some element I don’t recognize, my mind goes straight to Huh! New to me, but probably old news for everyone else. It’s poor posture, I know, as it could just as easily be:

Read More

Animating CSS Grid (How To + Examples) | CSS-Tricks

I’m pleased to shine a light on the fact that the CSS grid-template-rows and grid-template-columns properties are now animatable in all major web browsers! Well, CSS Grid has technically supported animations for a long time, as it’s baked right into the CSS Grid Layout Module Level 1 spec. But animating these grid properties only recently gained supported by all three major browsers. Shall we take a look at a few

Read More

Getting Started With SvelteKit | CSS-Tricks

SvelteKit is the latest of what I’d call next-gen application frameworks. It, of course, scaffolds an application for you, with the file-based routing, deployment, and server-side rendering that Next has done forever. But SvelteKit also supports nested layouts, server mutations that sync up the data on your page, and some other niceties we’ll get into. This post is meant to be a high-level introduction to hopefully build some excitement for

Read More

6 Common SVG Fails (and How to Fix Them) | CSS-Tricks

Someone recently asked me how I approach debugging inline SVGs. Because it is part of the DOM, we can inspect any inline SVG in any browser DevTools. And because of that, we have the ability to scope things out and uncover any potential issues or opportunities to optimize the SVG. But sometimes, we can’t even see our SVGs at all. In those cases, there are six specific things that I

Read More

More Real-World Uses for :has() | CSS-Tricks

The :has() pseudo-class is, hands-down, my favorite new CSS feature. I know it is for many of you as well, at least those of you who took the State of CSS survey. The ability to write selectors upside down gives us more superpowers I’d never thought possible. I say “more superpowers” because there have already been a ton of really amazing clever ideas published by a bunch of super smart

Read More

How to Transition to Manifest V3 for Chrome Extensions | CSS-Tricks

While I am not a regular Chrome extension programmer, I have certainly coded enough extensions and have a wide enough web development portfolio to know my way around the task. However, just recently, I had a client reject one of my extensions as I received feedback that my extension was “outdated”. As I was scrambling to figure out what was wrong, I swept my embarrassment under the carpet and immediately

Read More