Search
Open FaceTime Call from Command Line
11.4.2019
Communication tools are always associated with UIs, and for good reason — if you want communication to be easy and intuitive, you need easy and intuitive interfaces. We need communication tools to provide the lowest barrier of entry, since not all users will be tech savvy. For tech experts...
Using “box shadows” and clip-path together
11.4.2019
Let's do a little step-by-step of a situation where you can't quite do what seems to make sense, but you can still get it done with CSS trickery. In this case, it'll be applying a shadow to a shape.
You make a box
.tag {
background: #FB8C00;
color: #222;
font: bold 32px system-ui;
padding:...
Under-Engineered Toggles
10.4.2019
Toggles. Switches. Whatever you want to call them, they've been with us for some time and have been a dominant a staple for many form interfaces. They're even baked right into many CSS frameworks, including Bootstrap and Foundation.
It's easy to think of them in binary terms: on and off. Off...
In Defense of the Ternary Statement
10.4.2019
Some months ago I was on Hacker News (as one does) and I ran across a (now deleted) article about not using if statements. If you’re new to this idea (like I was), you’re in a for a real treat. Just search for "if statements" on Hacker News. You'll get articles proposing that you might not need...
The Best React Extension for VS Code
10.4.2019
When working with React, there's lots of code that gets repeated over and over....and over and over again. Eventually, you start to think, "there's got to be a better way". Don't w
Using a Mixin to Take the Math out of Responsive Font Sizes
9.4.2019
Responsive Font Size (RFS) is an engine that automatically calculates and updates the font-size property on elements based on the dimensions of the browser viewport.
If you’re thinking that sounds familiar, that’s because there is a slew of tools out there that offer various approaches for fluid...
Native Lazy Loading
9.4.2019
IntersectionObserver has made lazy loading a lot easier and more efficient than it used to be, but to do it really right you still gotta remove the src and such, which is cumbersome. It's definitely not as easy as:
<img src="celebration.jpg" loading="lazy" alt="..." />
Addy Osmani says...
Creating an Extension Pack for Visual Studio Code
8.4.2019
Extension Packs in Visual Studio Code are extremely useful when you want to install a collection of related extensions. In this article, let's walk through the steps of creating an Extension Pack s
Undefined: The Third Boolean Value
5.4.2019
I wanted to implement a notification message in one of my projects, similar to what you’d see in Google Docs while a document is saving. In other words, a message shows up indicating that the document is saving every time a change is made. Then, once the changes are saved, the message becomes: “All...
Revisiting the Rendering Tier
5.4.2019
Have you ever created a well-intentioned, thoughtful design system only to watch it grow into an ever-increasing and scary codebase? I've been working in sort of the opposite direction, inheriting the scary codebase and trying to create a thoughtful system from it.
Here's Alex Sanders on the topic...
A Couple of New Wufoo Tips
4.4.2019
(This is a sponsored post.)
High fives to Wufoo, our long-time sponsor here on CSS-Tricks. It's powered the vast majority of forms I've built over the past decade. If you've never used it or heard of it: it's a form builder. It makes the arduous task of implementing forms trivially easy. Building...
Inspirational Websites Roundup #3
4.4.2019
A fresh selection of unique web designs from around the web. Our third creative websites compilation to get you inspired.
Inspirational Websites Roundup #3 was written by Mary Lou and published on Codrops
Validating a Login Form With React
4.4.2019
For almost every form that you create, you will want some sort of validation. In React, working with and validating forms can be a bit verbose, so in this article we are going to use a package call
Building a Custom Sitemap for Your Gatsby.js Site
3.4.2019
Building static sites with React.js using Gatsby.js seem to be more and more a topic of debate when you require an easy to deploy setup, blazing fast speed and smooth developer experience. Gatsby h
Make it hard to screw up driven development
2.4.2019
Development is complicated. Our job is an ongoing battle between getting the job done and doing that job in a safe, long-lasting way.
Developers say things like, "I'm just going to do this quick and dirty first," because it's taken as fact that if you code anything quickly, it not only will...
Form Validation in Under an Hour with Vuelidate
2.4.2019
Form validation has a reputation for being tricky to implement. In this tutorial, we’ll break things down to alleviate some of that pain. Creating nice abstractions for forms is something that Vue.js excels at and Vuelidate is personally my favorite option for validations because it doesn't require...
Who has the fastest website in F1?
2.4.2019
Jake Archibald looks at the websites of Formula One race teams and rates their performance, carefully examining their images and digging into the waterfall of assets for each site:
Trying to use a site while on poor connectivity is massively frustrating, so anything sites can do to make it less...
KV Storage
1.4.2019
localStorage is...
Good! It's an incredibly easy API to use.
localStorage.setItem('name', 'Chris'); let name = localStorage.getItem('name');
Bad! Philip Walton explains why:
localStorage is a synchronous API that blocks the main thread, and any time you access it you potentially prevent your...
Scroll-Linked Animations
29.3.2019
You scroll down to a certain point, now you want to style things in a certain way. A header becomes fixed. An animation triggers. A table of contents appears. To do anything based on scroll position, JavaScript is required right now. You watch the scroll position via a DOM event and alter...
You probably don’t need input type=“number”
29.3.2019
Brad Frost wrote about a recent experience with a website that used <input type="number">:
Last week I got a call from my bank regarding a wire transfer I had just scheduled. The customer support guy had me repeat everything back to him because there seemed to be a problem with...