Web Development

Web Development Latest News

css-tricks.com

Scrollbar Reflowing

This is a bit of advice for developers on Macs I’ve heard quite a few times, and I’ll echo it: go into System Preferences > General > Show scroll bars and set to always. This isn’t about you, it’s about the web. See, the problem is that without this setting on, you’ll never experience scrollbar-triggered …

css-tricks.com

Architecting With Next.js

Free event hosted by Netlify coming up next week (Wednesday, August 25th): Architecting with Next.js. It’s just a little half-day thing. No brainer. Join us for a special event where we’ll highlight business teams using Next.js in production, including architecture deep dives, best practices and challenges. Next.js is the fastest-growing framework for Jamstack developers. With …

css-tricks.com

Introduction to the Solid JavaScript Library

Solid is a reactive JavaScript library for creating user interfaces without a virtual DOM. It compiles templates down to real DOM nodes once and wraps updates in fine-grained reactions so that when state updates, only the related code runs. This way, the compiler can optimize initial render and the runtime optimizes updates. This focus on …

css-tricks.com

Detecting Media Query Support in CSS and JavaScript

You can’t just do @media (prefers-reduced-data: no-preference) alone because, as Kilian Valkhof says: … that would be false if either there was no support (since the browser wouldn’t understand the media query) or if it was supported but the user wanted to preserve data. Usually @supports is the tool for this in CSS, but that doesn’t work …

css-tricks.com

Native JavaScript Routing?

We can update the URL in JavaScript. We’ve got the APIs pushState and replaceState: JavaScript is also capable of replacing any content in the DOM. So with those powers combined, we can build a website where we navigate to different “pages” but the browser never refreshes. That’s literally what “Single Page App” (SPA) means.

css-tricks.com

“Disambiguating Tailwind”

I appreciated this bit of nuance from a post on Viget’s blog: There could be a whole article written about the many flavours of Tailwind, but broadly speaking those flavours are: 1. Stock tailwind, ie. no changes to the configuration,2. Tailwind that heavily relies on @apply in CSS files but still follows BEM or some other component …

css-tricks.com

Creating a Headless WordPress Site With Frontity

Frontity is a WordPress-focused React-based server-side dynamic-rendering framework (phew!) that allows us to create fast headless websites. Chris has a good introduction to Frontity. I guess you could think of it like Next.js for WordPress. And while the demand for headless WordPress sites may be a niche market at the moment, the Frontity showcase page …

css-tricks.com

Using Nuxt and Supabase for a Multi-User Blogging App

Nuxt is a JavaScript framework that extends the existing functionality of Vue.js with features like server-side rendering, static page generation, file-based routing, and automatic code splitting among other things. I’ve been enjoying using frameworks like Nuxt and Next because they offer not only more features, but better performance and a better developer experience than the …

css-tricks.com

Native Search vs. Jetpack Instant Search in Headless WordPress With Gatsby

Have you already tried using WordPress headlessly with Gatsby? If you haven’t, you might check this article around the new Gatsby source plugin for WordPress; gatsby-source-wordpress is the official source plugin introduced in March 2021 as a part of the Gatsby 3 release. It significantly improves the integration with WordPress. Also, the WordPress plugin WPGraphQL …

css-tricks.com

DX, to Whom?

Dave points to Sarah’s post on Developer Experience (DX) at Netlify. Part of what Sarah did there is lay out what the role means. It’s a three-part thing: Integrations Engineering (e.g. features) Developer Experience Engineering (e.g. building integrations to ensure quality end-to-end for customers) Documentation (e.g. … uh, documentation) I like it. You gotta define …

css-tricks.com

Tabs in HTML?

Brian Kardell shares a bit about the progress of bringing “Tabs” to HTML. We kinda think we know what they are, but you have to be really specific when dealing with specs and defining them. It’s tricky.

css-tricks.com

Cutouts

Ahmad Shadeed dug into shape “cutouts” the other day. Imagine a shape with another smaller shape carved out of it. In his typical comprehensive way, Ahmad laid out the situation well—looking at tricky situations that complicate things.

css-tricks.com

HTML is Not a Programming Language?

HTML is not a programming language. I’ve heard that sentence so many times and it’s tiring. Normally, it is followed by something like, It doesn’t have logic, or, It is not Turing complete,.so… obviously it is not a programming language. Like it’s case-closed and should be the end of the conversation. Should it be, though?

css-tricks.com

Unicode Arrows

Looks like… 253 of them. I love the little water ⥾ spout one. (U+297e). Because. And I like how it’s a fairly useful little site at a great domain and with a little business model behind it. Reminds me of a little feature I like in Notion where if you type dash-arrow (like ->) it …

css-tricks.com

Building a Cool Front End Thing Generator

Whether you are just starting out on the front end, or you’ve been doing it for a long time, building a tool that can generate some cool front-end magic can help you learn something new, develop your skills and maybe even get you a little notoriety. You might have run across some of these popular …

css-tricks.com

Stay alert

A few days ago, Chris wrote up his thoughts about how alert(), confirm(), and prompt() were being deprecated by Chrome and collected a bunch of thoughts from developers. If certain features can essentially be turned off by a major browser, a lot of folks started to worry about the predictability of the web. On that …

css-tricks.com

Using Web Components in WordPress is Easier Than You Think

Now that we’ve seen that web components and interactive web components are both easier than you think, let’s take a look at adding them to a content management system, namely WordPress. There are three major ways we can add them. First, through manual input into the site—putting them directly into widgets or text blocks, basically …

css-tricks.com

Wanna see a whiter white?

Heck of a CSS trick here from Dongsung Kim. There are hidden HDR videos playing at the corners of this page. When a HDR-capable browser encounters one, it switches to HDR mode. For some reason, CSS backdrop-filter + brightness >100% combo seems to behave like HDR—reaching beyond the user-controlled display brightness, up to the maximum …

css-tricks.com

Static vs. Dynamic vs. Jamstack: Where’s The Line?

You’ll often hear developers talking about “static” vs. “dynamic” sites, or you may have heard someone use the term Jamstack. What do these terms mean, and when does a “static” site become either a Jamstack or dynamic site? These questions sound simple, but they’re more nuanced than they appear. Let’s explore these terms to gain …

css-tricks.com

Napkin

We took a surface level look at Pipedream the other day, which really does look cool. It’s like a much more modern and fancy version of what Yahoo Pipes was. A better comparison might be Zapier, except you write code (if you want to) to make easy-to-build cloud functions that can be triggered by anything …

css-tricks.com

View Source (on Mobile)

Have you ever wished you could see the HTML source of a web page while on a mobile browser, which generally doesn’t offer that feature? If you have a desktop machine around, there are ways, but what I mean is getting the source without anything but the device itself. The little View Source tool by …

css-tricks.com

Responsible Markdown in Next.js

Markdown truly is a great format. It’s close enough to plain text so that anyone can quickly learn it, and it’s structured enough that it can be parsed and eventually converted to you name it. That being said: parsing, processing, enhancing, and converting Markdown needs code. Shipping all that code in the client comes at …

css-tricks.com

WooCommerce With Apple Pay and Google Pay

Got a WooCommerce store? It behooves you to offer a variety of payment methods. Just anecdotally, I’m sure both you and me have been annoyed and even abandoned purchases when a merchant, online or otherwise, doesn’t take the payment method we want to pay with. That’s just straight-up lost sales for the merchant. But you …

css-tricks.com

CSS Nesting, specificity, and you

Here’s Kilian Valkhof on CSS nesting which isn’t available in browsers yet, but will be soon. There are a few differences he notes between CSS nesting and nesting in Sass or Less though. Take, for example, the following code: When CSS nesting lands, that last line border: 1px solid; won’t be applied to the div …

css-tricks.com

The Large, Small, and Dynamic Viewports

We’ve got viewport units (e.g. vw, vh, vmin, vmax), and they are mostly pretty great. It’s cool to always have a unit available that is relative to the entire screen. But when you ask people what they want fixed up in CSS, viewport units are always on the list. The problem is that people use …