Search
How to Add Text in Borders Using Basic HTML Elements
1.12.2020
Some HTML elements come with preset designs, like the inconveniently small squares of <input type="checkbox"> elements, the limited-color bars of <meter> elements, and the “something about them bothers me” arrows of the <details> elements. We can style them to match...
Under-Engineered Responsive Tables
1.12.2020
I first blogged about responsive data tables in 2011. When responsive web design was first becoming a thing, there were little hurdles like data tables that had to be jumped. The nature of <table> elements are that they have something a minimum width depending on the content they contain...
Native CSS Masonry Layout In CSS Grid
1.12.2020
Rachel Andrew introducing the fact that masonry layout is going to be a thing in native CSS via CSS grid layout. The thing with masonry is that we can already do it for the most part, but there is just one thing that makes it hard: doing the vertical-staggering and having a left-to-right source...
Super Tiny Icons
30.11.2020
A bunch of SVG icons (of popular things) all under 1KB. SVG is awesome for golfing.
I was going to add a CodePen logo but there is already one in there at 375 Bytes. I’ve got one at 208 Bytes, based on a logo update David DeSandro did for us a couple years back.
Direct Link to Article...
Lots of Ways to Use Math.random() in JavaScript
30.11.2020
Math.random() is an API in JavaScript. It is a function that gives you a random number. The number returned will be between 0 (inclusive, as in, it’s possible for an actual 0 to be returned) and 1 (exclusive, as in, it’s not possible for an actual 1 to be returned).
Math.random(); // returns...
A Complete State Machine Made With HTML Checkboxes and CSS
27.11.2020
State machines are typically expressed on the web in JavaScript and often through the popular XState library. But the concept of a state machine is adaptable to just about any language, including, amazingly, HTML and CSS. In this article, we’re going to do exactly that. I recently built a website...
Exploring What the Details and Summary Elements Can Do
26.11.2020
We’ve mentioned before just how great the <details> and <summary> elements are. They’re great for quickly making accordions that are accessible to touch, mouse, and keyboard input:
CodePen Embed Fallback
<details> and <summary> can even be used to play/pause gifs!...
Three Things You Didn’t Know About AVIF
26.11.2020
AVIF, the file format based on the AV1 video codec, is the latest addition to the next-gen image formats. Early reports and comparisons show good results compared to JPEG and WebP. However, even if browser support is good, AVIF is still on the bleeding edge in regards to encoding and decoding....
Tailwind versus BEM
25.11.2020
Some really refreshing technological comparison writing from Eric Bailey. Like, ya know, everything in life, we don’t have to hate or love everything. Baby bear thinking, I like to say. There are benefits and drawbacks. Every single bullet point here is well-considered and valid. I really...
Considerations for Making a CSS Framework
25.11.2020
Around eight months ago, I started building a framework which would eventually go on to become Halfmoon. I made a post on this very website announcing the launch of the very first version. Halfmoon has been billed as a Bootstrap alternative with a built-in dark mode feature, that is especially good...
Rendering Spectrum
25.11.2020
Here are the big categories of rendering websites:
Client: ship a <div id="root"></div> and let a JavaScript template render all of it.
Static: pre-render all the HTML.
Server: let a live server process requests and generate the HTML response.
They are not mutually exclusive....
What I’m Thankful For: 2020
24.11.2020
My parents loathe when I use poor language but luckily they don’t read this blog so I’ll just be blunt: 2020 has been an absolute shit show. COVID-19 has been a world-wide source of devastation to lives, jobs, and our quality of life. That said, I’ve found myself feeling...
How to Load Fonts in a Way That Fights FOUT and Makes Lighthouse Happy
24.11.2020
A web font workflow is simple, right? Choose a few nice-looking web-ready fonts, get the HTML or CSS code snippet, plop it in the project, and check if they display properly. People do this with Google Fonts a zillion times a day, dropping its <link> tag into the <head>.
Let’s...
The Core Web Vitals hype train
24.11.2020
Some baby bear thinking from Katie Sylor-Miller:
my excitement for Core Web Vitals is tempered with a healthy skepticism. I’m not yet convinced that Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS) are the right metrics that all sites should...
Creating UI Components in SVG
24.11.2020
I’m thoroughly convinced that SVG unlocks a whole entire world of building interfaces on the web. It might seem daunting to learn SVG at first, but you have a spec that was designed to create shapes and yet, still has elements, like text, links, and aria labels available to you. You can accomplish...
How to Create a Timeline Task List Component Using SVG
24.11.2020
I’m thoroughly convinced that SVG unlocks a whole entire world of building interfaces on the web. It might seem daunting to learn SVG at first, but you have a spec that was designed to create shapes and yet, still has elements, like text, links, and aria labels available to you. You can accomplish...
Graphery SVG
24.11.2020
I’ve compared SVG and Canvas before. If you’re trying to decide between them, read that. I’d say the #1 difference between them is vector (SVG) versus raster (Canvas). But the #2 difference is how you work with them. SVG is declarative, as in, literal elements that express what they are through...
DRY-ing up styled-components
23.11.2020
I like working with styled-components. They allow you write CSS in your JavaScript, keeping your CSS in very close proximity to your JavaScript for a single component. As a front-end developer who loves to dissect a web page and break it down into reusable components, the idea of styled-components...
What’s Missing from CSS?
21.11.2020
The survey results from the State of CSS aren’t out yet, but they made this landing page that randomly shows you what one person wrote to answer that question. Just clicking the reload button a bunch, I get the sense that the top answers are:
Container Queries
Parent...
Blog Author Tipped $10,000 for Well Phrased Peer-to-Peer Cash Conviction
21.11.2020
Following the Bitcoin Cash upgrade, the BCH proponent known as Mobtwo published a post on the read.cash blogging website called “Bitcoin Cash – Simple Fundamentals.” The editorial’s author says he wholeheartedly believes that BCH will one day overtake BTC in the long run....