Search
Flexbox-like “just put elements in a row” with CSS grid
21.5.2020
It occurred to me while we were talking about flexbox and gap that one reason we sometimes reach for flexbox is to chuck some boxes in a row and space them out a little.
My brain still reaches for flexbox in that situation, and with gap, it probably will continue to do so. It’s worth noting...
Roll Your Own Comments With Gatsby and FaunaDB
21.5.2020
If you haven’t used Gatsby before have a read about why it’s fast in every way that matters, and if you haven’t used FaunaDB before you’re in for a treat. If you’re looking to make your static sites full blown Jamstack applications this is the back...
Avoid Heavy Babel Transformations by (Sometimes) Not Writing Modern JavaScript
20.5.2020
It’s hard to imagine writing production-ready JavaScript without a tool like Babel. It’s been an undisputed game-changer in making modern code accessible to a wide range of users. With this challenge largely out of the way, there’s not much holding us back from really leaning into...
Radio Buttons Are Like Selects; Checkboxes Are Like Multiple Selects
20.5.2020
I was reading Anna Kaley’s “Listboxes vs. Dropdown Lists” post the other day. It’s a fairly straightforward comparison between different UI implementations of selecting options. There is lots of good advice there. Classics like that you should use radio buttons (single...
WordPress Block Transforms
20.5.2020
This has been the year of Gutenberg for us here at CSS-Tricks. In fact, that’s a goal we set at the end of last year. We’re much further along that I thought we’d be, authoring all new content in the block editor¹, enabling the block editor for all content now. That means when...
How to Build a Chrome Extension
19.5.2020
I made a Chrome extension this weekend because I found I was doing the same task over and over and wanted to automate it. Plus, I’m a nerd during a pandemic, so I spend my weird pent-up energy building things. I’ve made five Chrome extensions with that energy, yet I still find it hard...
User agents
19.5.2020
Jeremy beating the classic drum:
For web development, start with HTML, then CSS, then JavaScript (and don’t move on to JavaScript too quickly—really get to grips with HTML and CSS first).
And then…
That’s assuming you want to be a good well-rounded web developer. But it might be that...
Using BugHerd to Track Visual Feedback on Websites
19.5.2020
BugHerd is about collecting visual feedback for websites.
If you’re like me, you’re constantly looking at your own websites and you’re constantly critiquing them. I think that’s healthy. Nothing gets better if you look at your own work and consider it perfectly finished....
First Steps into a Possible CSS Masonry Layout
18.5.2020
It’s not at the level of demand as, say, container queries, but being able to make “masonry” layouts in CSS has been a big ask for CSS developers for a long time. Masonry being that kind of layout where unevenly-sized elements are layed out in ragged rows. Sorta like a typical...
Unprefixed `appearance `
18.5.2020
It’s interesting how third-parties are sometimes super involved in pushing browser things forward. One big story there was how Bloomberg hired Igalia to implement CSS grid across the browsers.
Here’s another story of Bocoup doing that, this time for the appearance property. The story...
Tackling Authentication With Vue Using RESTful APIs
18.5.2020
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
15.5.2020
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...
Comparing Social Media Outlets for Developer Tips
15.5.2020
As a little experiment, I shared a development tip on three different social networks. I also tried to post it in a format that was most suitable for that particular social network:
On Twitter, I made it a thread.
On Instagram, I made it a series of images.
On YouTube, I made it a video.
How...
How to Tame Line Height in CSS
15.5.2020
In CSS, line-height is probably one of the most misunderstood, yet commonly-used attributes. As designers and developers, when we think about line-height, we might think about the concept of leading from print design — a term, interestingly enough, that comes from literally putting pieces of lead...
WTF is a Static API
15.5.2020
Just like there is a movement to make more websites (and more of websites) from pre-rendered static files (Jamstack), so to might we consider moving content-based APIs to be static. Sean C Davis:
A static API is simply a collection of flat JSON files that live on a content delivery...
Notion-Powered Websites
14.5.2020
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 to Make a Simple CMS With Cloudflare, GitHub Actions and Metalsmith
14.5.2020
Let’s build ourselves a CMS. But rather than build out a UI, we’re going to get that UI for free in the form of GitHub itself! We’ll be leveraging GitHub as the way to manage the content for our static site generator (it could be any static site generator). Here’s the gist of it: GitHub is going...
Online Together
14.5.2020
(This is a sponsored post.)
An Event Apart: Online Together is a single-day online conference with an intense focus on digital design, UX, content, code, and more, giving you deep insights into where we are now and where things are going next.
AEA! With a brand new online version of their...
Equal Width Columns in CSS Grid are Kinda Weird
14.5.2020
Everything is flexible these days. If you write grid-template-columns: 200px 200px 200px;, sure, you’d have equal-width columns, but that’s a rare day. What you usually mean is three columns of equal fluid width.
We’ve got fractional units for that, like grid-template-columns:...
Pseudo-elements in the Web Animations API
14.5.2020
To use the Web Animations API (e.g. el.animate()) you need a reference to a DOM element to target. So, how do you use it on pseudo-elements, which don’t really offer a direct reference? Dan Wilson covers a (newish?) part of the API itself:
const logo...