Web Development

Web Development Latest News

css-tricks.com

Different Favicon for Development

I bet a lot of us tend to have the production website and the development website up simultaneously a lot. It’s almost a developer cliché at this point to make some local change, refresh, refresh, refresh, refresh, and just not see the change, only to discover you were looking at the production website, not your …

css-tricks.com

CSS :nth-of-class selector

That’s not a thing. But it kinda is! Bram covers how frustrating .bar:nth-child(2) is. It’s not “select the second element of class .bar.” It’s “select the second element if it also has the class .bar.” The good news? There is a real selector that does the former: Safari only. Here are the tickets for Chrome …

css-tricks.com

Building a Real-Time Chat App with React and Firebase

In this article, we’ll cover key concepts for authenticating a user with Firebase in a real-time chat application. We’ll integrate third-party auth providers (e.g. Google, Twitter and GitHub) and, once users are signed in, we’ll learn how to store user chat data in the Firebase Realtime Database, where we can sync data with a NoSQL …

css-tricks.com

CSS Can Influence Screenreaders

Ben Myers covers some clear examples of where CSS totally changes what some screen readers announce. For example, some screenreader will see text-transform: uppercase; on a button label that says “Add” and read it like an abbreviation, “A.D.D.” These cases of CSS messing with our screenreader announcements are initially shocking, perplexing, and maybe even appalling. …

css-tricks.com

Flexible Repeating SVG Masks

Tyler Gaw reminds us that mask-image can repeat, resize, and move just like background-image does, which is fun to combine and play with. I could see it being a fun option for an <hr>, like Sara is doing.

css-tricks.com

Auto-Archival

I’m sure most of us have used the ol’ Wayback Machine to access some site that’s gone offline. I don’t actually know how it decides what sites to archive and when, but you can tell it to save pages. There is UI for it right on its homepage. Also, there is a little trick…

css-tricks.com

Client-Side Image Editing on Mobile

Michael Scharnagl: Ever wanted to easily convert an image to a grayscale image on your phone? I do sometimes, and that’s why I build a demo using the Web Share Target API to achieve exactly that. For this I used the Service Worker way to handle the data. Once the data is received on the …

css-tricks.com

Neumorphism and CSS

Neumorphism (aka neomorphism) is a relatively new design trend and a term that’s gotten a good amount of buzz lately. It’s aesthetic is marked by minimal and real-looking UI that’s sort of a new take on skeuomorphism — hence the name. It got its name in a UX Collective post from December 2019, and since …

css-tricks.com

CSS2JS

To add inline styles on an element in JSX, you have to do it in this object syntax, like: That might look a little weird to us folks who are so used to the CSS syntax, where it is font-size (not fontSize), margin-bottom (not marginBottom), and semi-colons (not commas).

css-tricks.com

React Suspense in Practice

This post is about understanding how Suspense works, what it does, and seeing how it can integrate into a real web app. We’ll look at how to integrate routing and data loading with Suspense in React. For routing, I’ll be using vanilla JavaScript, and I’ll be using my own micro-graphql-react GraphQL library for data.

css-tricks.com

Consistent Backends and UX: What are the Barriers to Adoption?

There are very few scenarios in which an eventually consistent database is preferable over a strongly consistent database. Further, in a multi-region application scenario where scaling is necessary, choosing either an undistributed database or an eventually consistent database is even more questionable. So what motivates engineers to ignore strongly consistent distributed databases? We have seen many reasons, but wrong assumptions drive most of them.

css-tricks.com

A Few Background Patterns Sites

If I need a quick background pattern to spruce something up, I often think of the CSS3 Patterns Gallery. Some of those are pretty intense but remember they are easily editable because they are just CSS. That means you could take these bold zags and chill them out.

css-tricks.com

What Does `playsinline` Mean in Web Video?

I got myself confused about this the other day, went around searching for an answer and came up empty on finding something clear. The answer actually is quite clear and I feel a little silly for not knowing it. With it in place, like this: Mobile browsers, will play the video right where it is …

css-tricks.com

Playing With Particles Using the Web Animations API

When it comes to motion and animations, there is probably nothing I love more than particles. This is why every time I explore new technologies I always end up creating demos with as many particles as I can. In this post, we’ll make even more particle magic using the Web Animations API to create a …

css-tricks.com

Flexbox and absolute positioning

Chen Hui Jing notes that when you absolutely position a flex item, it’s no longer part of the flex layout. Except… it kinda is a little bit. If you make the child position: absolute; but don’t apply any top/right/bottom/left properties, then flexbox alignment will still apply to it. It’s odd to see, but it makes …

css-tricks.com

Tools for Optimizing SVG

This is our straight-to-the-point list of SVG optimizing tools across a number of categories. They are all largely based around SVGO, but how you use it depends. There are web apps, desktop apps, apis, and even design tool add-ons.

css-tricks.com

How to Create a “Skip to Content” Link

Skip links are little internal navigation links that help users move around a page. It’s possible you’ve never actually seen one before because they’re often hidden from view and used as an accessibility enhancement that lets keyboard users and screen readers jump from the top of the page to the content without have to go …

css-tricks.com

WooCommerce 4.0 & WooCommerce Payments Beta

Y’all know WooCommerce: it’s a plugin for WordPress that adds robust eCommerce functionality to your site. Notably, like WordPress itself, it’s open-source and free. You only pay for things if you need things like special plugins that extend functionality. This is a huge month for WooCommerce! Two major releases: Version 4.0 is here WooCommerce Payments …

css-tricks.com

CSS X

My name appears in an article from Bert Bos (co-author of the original CSS spec), so I’ll consider that a life accomplishment. Bert makes the point that CSS has evolved and the working group versions things, but the working group hasn’t been and doesn’t really plan to be involved in these big named banner releases …

css-tricks.com

Stop Using “Dropdown”

Adrian Roselli notes that it might actually mean: A <select> menu An ARIA Listbox, Combobox, Menu, or Disclosure Widget An input with a <datalist> An input with autocomplete A <details><summary> block An accordion Flyout navigation In my own usage, I tend to mean “A UI pattern where you click/tap a small thing and a big …

css-tricks.com

Using the HTML title attribute

 Steve Faulkner: User groups not well served by use of the title attribute • Mobile phone users.• Keyboard only users.• Screen magnifier users.• Screen reader users.• Users with fine motor skill impairments.• Users with cognitive impairments. Sounds like in 2020, the only useful thing the title attribute can do is label an <iframe title=”Contact Form”></iframe>.

css-tricks.com

The CSS Podcast

From Adam and Una at Google, a podcast just about CSS. I believe I’m contractually obliged to link to that! Just one episode out so far, a shorty about the box model. Last time I wrote up podcasts I like was 8 years ago most of them are dead now, except the biggies like This …

css-tricks.com

“weeds of specificity”

Lara Schenck: … with WordPress child themes, you are all but guaranteed to get into the weeds of specificity, hunting around theme stylesheets that you didn’t author, trying to figure out what existing declaration is preventing you from applying a new style, and then figuring out the least specificity you need to override it, and …

css-tricks.com

Get Started Building GraphQL APIs With Node

We all have a number of interests and passions. For example, I’m interested in JavaScript, 90’s indie rock and hip hop, obscure jazz, the city of Pittsburgh, pizza, coffee, and movies starring John Lurie. We also have family members, friends, acquaintances, classmates, and colleagues who also have their own social relationships, interests, and passions. Some …

css-tricks.com

A Guide to Handling Browser Events

In this post, Sarah Chima walks us through how we can work with browser events, such as clicking, using JavaScript. There’s a ton of great info in here! If JavaScript isn’t your strong suit, I think this is the best explanation of event handling that I’ve read in quite some time.

css-tricks.com

Two Steps Forward, One Step Back

Brent Jackson says CSS utility libraries failed somewhat: Eventually, you’ll need to add one-off styles that just aren’t covered by the library you’re using, and there isn’t always a clear way to extend what you’re working with. Without a clear way to handle things like this, developers tend to add inconsistent hacks and append-only styles. …