The Options for Programmatically Documenting CSS

I strongly believe that the documentation should be kept as close to the code as possible. Based on my experience, that’s the only option that works well in the long term. External documents, notes, and wikis all eventually get outdated, forgotten, and lost.

Documentation is a topic that always bugs me. Working on poorly documented codebase is a ticking bomb. It makes the onboarding process a tedious experience. Another way to think of bad documentation is that it helps foster …


The Options for Programmatically Documenting CSS is a post from CSS-Tricks

Local by Flywheel

I’ve switched all my local WordPress development over to Local by Flywheel. I heard about it from y’all when we did a poll not to long ago about local WordPress development. Bottom line: it’s really good. It does everything you want it to, well, with zero hassle, and nothing more.

Running Multiple WordPress Installs (PHP, MySQL, Web Server)

That’s kind of the whole point. Local by Flywheel spins up a local site for you with all the dependencies …


Local by Flywheel is a post from CSS-Tricks

Firebase & React Part 2: User Authentication

Today we’ll be adding authentication (via Google Authentication and Firebase) to our Fun Food Friends app, so that only users that are signed in can view who is bringing what to the potluck, as well as be able to contribute their own items. When users are not signed in, they will be unable to see what people are bringing to the potluck, nor will they be able to add their own items.


Firebase & React Part 2: User Authentication is a post from CSS-Tricks

If You’re Inlining SVG Icons, How Do You Deal With Unique Titles and IDs?

Just inlining SVG seems to be the easiest and most flexible icon system. But that chunk of <svg> might have a <title>, and you might be appying IDs to both of those elements for various reasons.

One of those reasons might be because you just want an ID on the icon to uniquely identify it for JavaScript or styling purposes.

Another of those reasons is that for accessibility, it’s recommended you use aria-labelledby to connect the id and title, …


If You’re Inlining SVG Icons, How Do You Deal With Unique Titles and IDs? is a post from CSS-Tricks

How to Change the Category Base Prefix in WordPress

Do you want to change the category base prefix in WordPress? By default, WordPress automatically adds /category/ as a prefix to URLs for all category pages. In this article, we will show you how to change the category base prefix in WordPress. We will also… Read More »

The post How to Change the Category Base Prefix in WordPress appeared first on WPBeginner.

A Pretty Good SVG Icon System

I’ve long advocated SVG icon systems. Still do. To name a few benefits: vector-based icons look great in a high pixel density world, SVG offers lots of design control, and they are predictable and performant.

I’ve also often advocated for a SVG icon system that is based on <symbol>s (an “SVG sprite”) and the <use> element for placing them. I’ve changed my mind a little. I don’t think that is a bad way to go, really, but there is …


A Pretty Good SVG Icon System is a post from CSS-Tricks

Stickybits: an alternative to `position: sticky` polyfills

Stickybits is a small JavaScript utility plugin. It’s goal is not to get in the way. It does one thing well: help with sticky elements. It is not dependent on other JavaScript Plugins, can be imported via npm, and approaches sticky elements in a very utility-oriented way.

Solving the sticky element problem can lead to sticky situations

When navigating sites, it is common to see HTML elements, like banners and navigations, sticking to the top and bottom of the browser. …


Stickybits: an alternative to `position: sticky` polyfills is a post from CSS-Tricks

Form Validation Part 1: Constraint Validation in HTML

Most JavaScript form validation libraries are large, and often require other libraries like jQuery. For example, MailChimp’s embeddable form includes a 140kb validation file (minified). It includes the entire jQuery library, a third-party form validation plugin, and some custom MailChimp code. In fact, that setup is what inspired this new series about modern form validation. What new tools do we have these days for form validation? What is possible? What is still needed?

In this series, I’m going to show …


Form Validation Part 1: Constraint Validation in HTML is a post from CSS-Tricks

Form Validation Part 2: The Constraint Validation API (JavaScript)

In my last article, I showed you how to use native browser form validation through a combination of semantic input types (for example, <input type="email">) and validation attributes (such as required and pattern).

While incredibly easy and super lightweight, this approach does have a few shortcomings.

  1. You can style fields that have errors on them with the :invalid pseudo-selector, but you can’t style the error messages themselves.
  2. Behavior is also inconsistent across browsers.

User studies from Christian Holst


Form Validation Part 2: The Constraint Validation API (JavaScript) is a post from CSS-Tricks