Search
A Follow-Up to PHP Templating
28.2.2020
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...
How to Customize the WooCommerce Cart Page on a WordPress Site
28.2.2020
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...
Where to Learn WordPress Theme Development
28.2.2020
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...
Data-driven Jamstack with Sourcebit
28.2.2020
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...
Why is CSS Frustrating?
28.2.2020
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:
That's just as unintuitive as JS starting to count at 0, but since you learned that and accept it, it's fine.
The real issue isn't with CSS. If...
When CSS Blocks
28.2.2020
Tim Kadlec:
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...
Animated Matryoshka Dolls in CSS
27.2.2020
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...
Let’s Say You Were Going to Write a Blog Post About Dark Mode
26.2.2020
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...
Chameleonic Header
26.2.2020
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...
Weaving a Line Through Text in CSS
26.2.2020
Earlier this year, I came across this demo by Florin Pop, which makes a line go either over or under the letters of a single line heading. I thought this was a cool idea, but there were a few little things about the implementation I felt I could simplify and improve at the same time.
First off,...
In-Browser Performance Linting With Feature Policies
26.2.2020
Here’s a neat idea from Tim Kadlec. He uses the Modheader extension to toggle custom headers in his browser. It also lets him see when images are too big and need to be optimized in some way. This is a great way to catch issues like this in a local environment because browsers will throw an error...
Instant GraphQL Backend with Fine-grained Security Using FaunaDB
25.2.2020
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...
Responsive Grid Magazine Layout in Just 20 Lines of CSS
25.2.2020
I was recently working on a modern take of the blogroll. The idea was to offer readers a selection of latest posts from those blogs in a magazine-style layout, instead of just popping a list of our favorite blogs in the sidebar.
The easy part was grabbing a list of posts with excerpts from...
Recreating the CodePen Gutenberg Embed Block for Sanity.io
25.2.2020
Learn how to create a custom CodePen block with a preview for Sanity Studio, inspired by Chris Coyier’s implementation for Wordpress’ Gutenberg editor.
The post Recreating the CodePen Gutenberg Embed Block for Sanity.io appeared first on CSS-Tricks
Pages for Likes
24.2.2020
I posted about parsing an RSS feed in JavaScript the other day. I also posted about my RSS setup talking about how Feedbin is at the heart of it.
Dave discovered that Feedbin can also produce an RSS feed for all your likes. Likes is a feature of Feedbin, and fortunately also NetNewsWire, which...
Gutenberging
24.2.2020
It's been over a year since the big WordPress launch of Gutenberg, the new editor. It seems to me most of the controversy around it has died down. There has been enough time that the UX and accessibility of it have improved, and people are seeing the potential a lot more clearly. There ain't...
wpaudit.site
24.2.2020
A big checklist of things you could/should be doing to make your website the best it can be. 80% of which is a good idea for any website, not just a WordPress website.
I'm linking to it because I like how plain language it is, and because it's a good example of how giving something away helps more...
wpaudit.site
24.2.2020
A big checklist of things you could/should be doing to make your website the best it can be. 80% of which is a good idea for any website, not just a WordPress website.
I'm linking to it because I like how plain language it is, and because it's a good example of how giving something away helps more...
Fixed Headers and Jump Links? The Solution is scroll-margin-top
21.2.2020
The problem: you click a jump link like <a href="#header-3">Jump</a> which links to something like <h3 id="header-3">Header</h3>. That's totally fine, until you have a position: fixed; header at the top of the page obscuring the header you're trying to link to!
Fixed...
Inspiring high school students with HTML and CSS
21.2.2020
Here’s a heartwarming post from Stephanie Stimac on her experience teaching kids the very basics of web development:
[...] the response from that class of high school students delighted me and grounded me in a way I haven't experienced before. What I view as a simple code was absolute magic...