Author
Chris Coyier
Comments
Go to Comments
<input type="number">
, <input type="date">
, <input type="search">
, <select multiple>
, <progress>
, <meter>
, <dialog>
, <details><summary>
, <video>
, <div onclick>
, <div aria-label>
, <a href><div>Block Links</div></a>
, aria-controls
, role="tablist"
😬😬😬😬😬😬😬😬😬😬😬😬
… Read article
Sponsored by
Mailchimp
Not long ago, I posted about PHP templating in just PHP (which is basically HEREDOC syntax). I'm literally using that technique for some super basic templating I needed to do on this very WordPress site. The main pushback was that this kind of thing can be an XSS vulnerability. In my case, it's not, because I'm not using it for anything other than an abstraction convenience for my own hand-written strings.
Since then, we've had a couple of good articles … Read article
A standard e-commerce site has a few common pages. There are product pages, shop pages that list products, and let’s not forget pages for the user account, checkout flow and cart.
WooCommerce makes it a trivial task to set these up on a WordPress site because it provides templates for them and create the pages for you right out of the box. This is what makes it easy to get your store up and running in a few minutes just … Read article
Over a decade ago, I did a little three-part video series on Designing for WordPress. Then I did other series with the same spirit, like videocasting the whole v10 redesign, a friend's website, and even writing a book. Those are getting a little long in the tooth though. You might still learn from watching them if you're getting into WordPress theme development, but there will be moments that feel very aged (old UI's and old versions … Read article
Think of building sites with Gatsby as an hourglass shape.
Gatsby itself is right in the middle. The wide funnel at the top represents the fact that Gatsby can take in data from all sorts of sources. The data could be in markdown files, from a headless CMS or some other API, from a hosted database, or pretty much whatever.
The wide funnel at the bottom represents that the output from Gatsby is static files, so those files can … Read article
Here’s a great thread by Kevin Powell that's making the rounds. He believes so many folks see CSS as a frustrating and annoying language:
… Read articleThat's just as unintuitive as JS starting to count at 0, but since you learned that and accept it, it's fine.
— Kevin Powell (@KevinJPowell) February 24,
The real issue isn't with CSS. If you struggle with it, or ever call it unintuitive, it's probably because you don't really understand how CSS is meant to work.
One particular pattern [for loading non-critical CSS] I’ve seen is the preload/polyfill pattern. With this approach, you load any stylesheets as preloads instead, and then use their
onload
events to change them back to a stylesheet once the browser has them ready.
So you're trying to make your stylesheet more async, but it causes two big problems:
GraphQL is becoming popular and developers are constantly looking for frameworks that make it easy to set up a fast, secure and scalable GraphQL API. In this article, we will learn how to create a scalable and fast GraphQL API with authentication and fine-grained data-access control (authorization). As an example, we’ll build an API with register and login functionality. The API will be about users and confidential files so we’ll define advanced authorization rules that specify whether a logged-in user … Read article
Here’s a fun one. How might we create a set of those cool Matryoshka dolls where they nest inside one another... but in CSS?
I toyed with this idea in my head for a little while. Then, I saw a tweet from CSS-Tricks and the article image had the dolls. I took that as a sign! It was time to put fingers to the keyboard.
Our goal here is to make these fun and interactive, where we can click on … Read article
This is not that blog post. I'm saying let's say you were.
This is not a knock any other blog posts out there about Dark Mode. There are lots of good ones, and I'm a fan of any information-sharing blog post. This is more of a thought exercise on what I think it would take to write a really great blog post on this subject.… Read article
Nice demo from Sebastiano Guerriero. When a fixed-position header moves from overlapping differently-colored backgrounds, the colors flop out to be appropriate for that background. Sebastiano's technique is very clever, involving multiple copies of the header within each section (where the copies are hidden from screenreaders) which are all positioned on top of each other and then revealed as the new section comes, thanks to each section having a clip-path
around it.
A bonafide CSS trick if I've ever seen one.… Read article
Your app is up and running! Now what? Seamlessly connect it to your marketing data.