Search
Balancing on a pivot with Flexbox
8.10.2020
Let me show you a way I recently discovered to center a bunch of elements around what I call the pivot. I promise you that funky HTML is out of the question and you won’t need to know any bleeding-edge CSS to get the job done.
I’m big on word games, so I recently re-imagined the main menu...
Styling Complex Labels
5.10.2020
Danielle Romo covers the HTML pattern you need when you have a wordy <label> with fancy styling for an <input type="radio">.
The trick? The ol’ <span class="hidden-visually"> that contains the label that you want to be read, and a <span aria-hidden="true"> with...
Recreating the “100 Days of Poetry” Effect with Shader, ScrollTrigger and CSS Grid
5.10.2020
The latest ALL YOUR HTML live coding session where you'll learn how to recreate the effect seen on the "100 Days of Poetry" website.
The post Recreating the “100 Days of Poetry” Effect with Shader, ScrollTrigger and CSS Grid appeared first on Codrops
Web Technologies and Syntax
24.9.2020
JavaScript has a (newish) feature called optional chaining. Say I have code like:
const name = Data.person.name;
If person happens to not exist on Data, I’m going to get a hard, show-stopping error. With optional chaining, I can write:
const name = Data.person?.name;
Now if person...
Using Markdown and Localization in the WordPress Block Editor
23.9.2020
If we need to show documentation to the user directly in the WordPress editor, what is the best way to do it?
Since the block editor is based on React, we may be tempted to use React components and HTML code for the documentation. That is the approach I followed in my previous article, which...
Thinking About Power Usage and Websites
22.9.2020
Gerry McGovern asked if I had any insight into energy consumption and websites. He has a book, after all, about the digital costs on the planet. He was wondering about the specifics of web tech, like…
If you do this in HTML it will consume 3× energy but if you do it in JavaScript it will...
Lessons Learned from Sixty Days of Re-Animating Zombies with Hand-Coded CSS
16.9.2020
I’ll be linking to individual Pens as I discuss the lessons I learned, but if you’d like to get a sense of the entire project, check out 60 days of Animation on Undead Institute. I started this project to end on August 1st, 2020, coinciding with the publication of a book I wrote featuring...
Inclusive Design 24
16.9.2020
Totally free.
No sign-up. No registration. All sessions are streamed live and publicly on the Inclusive Design 24 YouTube channel – see the entire playlist for the event.
Quite the lineup.
I’ve got a couple of other accessibility links burning a hole in my pocket as well:
Matt Stobbs:...
Editing HTML Like A Boss In VS Code
16.9.2020
Here’s a seven minute video from Caleb Porzio that focuses on some of Emmet‘s HTML editing features. You might think of Emmet as that thing that expands abbreviations like table.stats>tr*3>td*3 into glorious, expanded, and perfect HTML. But Emmet has other HTML editing trickery...
Form design
15.9.2020
A very digestable guide from Geri Reid on building forms. Not the code, but the design and UX principles that should guide the code.
Working on a design system for a bank has taught [me] a lot about forms. I’ve watched testing in our labs. I’ve worked alongside experts from specialist...
Modifying Specific Letters with CSS and JavaScript
10.9.2020
Changing specific characters can be a challenge in CSS. Often, we’re forced to implement our desired changes one-by-one in HTML, perhaps using the span element. But, in a few specific cases, a CSS-focused solution may still be possible. In this article, we’ll start by looking at some CSS-first...
AVIF has landed
8.9.2020
Everybody is talking about AVIF today because of Jake’s blog post. As the say, I was today years old when I learned AVIF was a thing. But thanks to web technology being ahead of the game for once, we can already take advantage of it.
This will be easier if you’ve abstracted your...
Beyond Media Queries: Using Newer HTML & CSS Features for Responsive Designs
4.9.2020
Beyond using media queries and modern CSS layouts, like flexbox and grid, to create responsive websites, there are certain overlooked things we can do well to make responsive sites. In this article, we’ll dig into a number tools (revolving around HTML and CSS) we have at the ready, from responsive...
Using @property for CSS Custom Properties
3.9.2020
Una Kravetz digs into how Chrome now allows you to declare CSS custom properties directly from CSS with more information than just a string.
So rather than something like this:
html {
--stop: 50%;
}
…can be declared with more details like this:
@property --stop {
syntax:...
a11y is web accessibility
29.8.2020
Eric Bailey eviscerates the notion that the term “a11y” isn’t accessible. It’s a hot take that I’ve had myself, embarrassingly enough.
I never see people asking why WWI is written out the way it is, either. Won’t people confuse that with the first Wonder Woman movie?...
a11y is web accessibility
29.8.2020
Eric Bailey eviscerates the notion that the term “a11y” isn’t accessible. It’s a hot take that I’ve had myself, embarrassingly enough.
I never see people asking why WWI is written out the way it is, either. Won’t people confuse that with the first Wonder Woman movie?...
Doom Damage Flash on Scroll
26.8.2020
The video game Doom famously would flash the screen red when you were hit. Chris Johnson not only took that idea, but incorporated a bunch of the UI from Doom into this tounge-in-cheek JavaScript library called Doom Scroller. Get it? Like, doom scrolling, but like, Doom scrolling. It’s funny...
radEventListener: a Tale of Client-side Framework Performance
18.8.2020
React is popular, popular enough that it receives its fair share of criticism. Yet, this criticism of React isn’t completely unwarranted: React and ReactDOM total about 120 KiB of minified JavaScript, which definitely contributes to slow startup time. When client-side rendering in React is relied...
Chapter 2: Browsers
12.8.2020
Previously in web history…
Sir Tim Berners-Lee creates the technologies behind the web — HTML, HTTP, and the URL which blend hypertext with the Internet — with a small team at CERN. He convinces the higher-ups in the organizations to put the web in the public domain so anyone can...
Practical Use Cases for JavaScript’s closest() Method
12.8.2020
Have you ever had the problem of finding the parent of a DOM node in JavaScript, but aren’t sure how many levels you have to traverse up to get to it? Let’s look at this HTML for instance:
<div data-id="123"<buttonClick me</button</div
That’s pretty straightforward, right? Say...