Smashing Magazine

Smashing Magazine

Vitaly Friedman, Smashing Magazine, an online magazine for professional Web designers and developers.

Smashing Magazine

Smashing Magazine

A Time Of Transition (October 2021 Desktop Wallpapers Edition)

Inspiration lies everywhere. In the fall leaves shining in the most beautiful colors these days, in the misty mornings and golden afternoons that October might bring along, or taking a walk on a windy day. Whatever it is that gets you inspired, our monthly wallpapers series is bound to give you a little inspiration boost, too.

For this October edition, artists and designers from across the globe once again challenged their creative skills and designed wallpapers to spark your imagination and make the month a bit more colorful as it already is. Just like every month since we embarked on this creativity mission more than ten years ago.

Read the article (6 min read)
Smashing Magazine

Smashing Magazine

Using Modern Image Formats: AVIF And WebP

Images are the most popular resource type on the web and are often the largest. Users appreciate high-quality visuals, but care needs to be taken to deliver those hero images, product photos and cat memes as efficiently and effectively as possible.

If you’re optimizing for the Web Vitals, you might be interested to hear that images account for ~42% of the Largest Contentful Paint element for websites. Key user-centric metrics often depend on the size, number, layout, and loading priority of images on the page. This is why a lot of our guidance on performance talks about image optimization.

A tl;dr of recommendations can be found below.

tl;dr
Read the article (9 min read)
Smashing Magazine

Smashing Magazine

Improving The Accessibility Of Your Markdown

Markdown is a small text to HTML conversion language. It was created by John Gruber in 2004 with the goal of making writing formatted text in a plain text editor easier. You can find Markdown in many places on the internet, especially in locations where developers are present. Two notable examples are comments on GitHub and the source code for posts on Smashing Magazine!

How Markdown Works

Markdown uses special arrangements of characters to format content. For example, you can create a link by wrapping a character, word, or phrase in square brackets. After the closing square bracket, you then include a URL wrapped in parenthesis to create a destination for the link.

So typing:

[I am a link](https://www.smashingmagazine.com/)

Would create the following HTML markup:

<a href="https://www.smashingmagazine.com/">I am a link</a>

You can also blend HTML with Markdown, and it will all boil down to HTML when compiled. The following example:

Read the article (8 min read)
Smashing Magazine

Smashing Magazine

Let’s Dive Into Cypress For End-to-End Testing

Software development without automated testing is hard to imagine today. A good variety of different test procedures will ensure a high level of quality. As a foundation for testing, we can use a number of unit tests. On top of that, in the middle of the pyramid, so to speak, are integration tests. End-to-end tests are at the very top, covering the most critical use cases. This third kind of testing will be the focus of this article.

However, end-to-end testing does have some pitfalls that are cause for concern:

Read the article (10 min read)
Smashing Magazine

Smashing Magazine

Lessons Learned Rebuilding A Large E-Commerce Website With Next.js (Case Study)

At our company, Unplatform, we have been building e-commerce sites for decades now. Over those years, we have seen the technology stack evolve from server-rendered pages with some minor JavaScript and CSS to full-blown JavaScript applications.

The platform we used for our e-commerce sites was based on ASP.NET and when visitors started to expect more interaction, we added React for the front-end. Although mixing the concepts of a server web framework like ASP.NET with a client-side web framework like React made things more complicated, we were quite happy with the solution. That was until we went to production with our highest traffic customer. From the moment we went live, we experienced performance issues. Core Web Vitals are important, even more so in e-commerce. In this Deloitte study:

Read the article (8 min read)
Smashing Magazine

Smashing Magazine

Free Online Workshop: Frustrating Design Patterns And How To Fix Them

Disabled buttons. Infinite scroll. Poor inline validation. Parallax. Carousels. Modals. Mega-dropdown hover menus. There is plenty of frustration on the web. Let’s fix that. Join us for a free online workshop on Frustrating Design Patterns on September 27 at 9:00 AM PDT / 6PM CET.

In the 2.5h live session we’ll take a close look at some of the confusing and annoying patterns and explore better alternatives alongside plenty of examples and checklists to keep in mind when building or designing one. You’ll walk away with a toolbox of techniques and examples of doing things well — in your product, website, desktop app or mobile app.

We’ll look into carousels, modals, infinite scroll, parallax and scrolljacking, mega-dropdown menus, disabled buttons, inline validation, frozen filters, CAPTCHA, authentication and privacy. Register for the free workshop.

Read the article (2 min read)
Smashing Magazine

Smashing Magazine

Simplifying Form Styles With `accent-color`

I don’t know about you, but I love it when new CSS properties arrive that make our daily lives as developers simpler and enable us to remove a whole lot of redundant code. aspect-ratio is one such property (recently eliminating the need for the padding hack). accent-color just might be the next.

Styling Form Inputs

Let’s take checkboxes. In every browser, these are styled differently by the user agent stylesheet (responsible for the browser’s default styles).

Read the article (3 min read)
Smashing Magazine

Smashing Magazine

Getting Your `head` Straight: A New CSS Performance Diagnostics Snippet

There are plenty of ways to detect performance bottlenecks and audit CSS. We can look into common performance bottlenecks and the complexity of stylesheets, the way we load assets, and the order in which it happens.

One helpful way to spot common problems easily is to use some sort of a performance diagnostics CSS — a dedicated stylesheet that highlights potential problems and errors.

Today, during his talk at Webexpo Prague 2021, Harry Roberts, a web performance consultant and front-end engineer, introduced a little helper that helps him spot common performance bottlenecks easily. And that is mostly related to the order of how assets are loaded in the <head>.

As Harry says,

Read the article (1 min read)
Smashing Magazine

Smashing Magazine

How To Build Your Own Mouseless Development Environment

Once upon a time, in the magical land of Software development, there was a young developer, your humble servant, discovering Linux for the first time. Suddenly, I had access to the Linux shell, a tool offering many ways to automate everything I didn’t want to do again and again.

But Ubuntu wasn’t without drawbacks. I was often the victim of display bugs and crashes, and it was getting slower and slower as time passed.

One day, something terrible happened: I had to update Ubuntu to its next major version. Everything crashed. I couldn’t start my system anymore. I had no idea how I could solve the problems I was facing because I had no idea how Linux was working under the hood. Ubuntu was abstracting all the nitty-gritty for me not to care about it.

Read the article (8 min read)
Smashing Magazine

Smashing Magazine

How Web Development Tools Are Helping Users Keep Pace With Rapid Change

Several years ago, I wrote about website builders for a living. Yes, that’s a thing. Back then there seemed to be a gulf between drag-and-drop tools and full-blown web development. Today, it’s heartening to see the likes of Wix adding more code-heavy options to their repertoire.

Judging by Velo’s report, I’m not alone in feeling that way.

The Covid-19 pandemic has forced much of the world online. Billions of people have been working, dating, and doom scrolling on the web more than ever before. To meet this change, businesses have been beefing up their online offering. Demand for web developers and development tools is higher than ever.

The team at Velo by Wix — which offers a full-stack, Rapid Web Development platform — wanted to examine what this mass digital migration means for the industry. What web development platforms are being used? Who are they being used by, and why?

Read the article (3 min read)
Smashing Magazine

Smashing Magazine

Are Imposter Domains Re-Publishing Your Website?

We think of web scraping as a tool used to harvest web content for information analysis purposes, sometimes to the detriment of the site owner. For example, someone might web scrape all the product pages of a competitor’s retail site to harvest information about products being offered and current pricing to try to gain a competitive edge.

Web scraping can be used to harvest marketing data, such as identifying good keywords for advertising campaigns, identifying trending topics for blog posts, or identifying influencers in important blogs and news sites. Manufacturers might scrape retail sites to make sure that Manufacturer Advertised Pricing (

Read the article (8 min read)
Smashing Magazine

Smashing Magazine

Monetize Open-Source Software With Gatsby Functions And Stripe

In this article, I’ll be explaining how I’ve used Gatsby Functions and the Stripe API to enable secure “Pay what you want” contributions that help fund my open-source project MDX Embed.

Note: MDX Embed allows you to easily embed popular third-party media content such as YouTube videos, Tweets, Instagram posts, Egghead lessons, Spotify, TikTok and many more straight into your .mdx — no import required.

Gatsby Serverless Functions

Gatsby Functions open up a whole new world for front-end developers as they provide a way to write and use server-side code without the hassle of maintaining a server. Uses for Serverless Functions range from Newsletter signups with ConvertKit, sending an email using SendGrid, saving data in a database like Fauna, or in this case, accepting secure payments using Stripe — the list is quite frankly endless!

Read the article (4 min read)
Smashing Magazine

Smashing Magazine

A Journey Into Web Quality Assurance: From User Requirements To Web Risk Management

As a chemist by trade, I received a Master's degree in Quality Management and Quality Control from Bordeaux University. My initial career was in the wine industry, ensuring the quality of the laboratory's operations and the analyses that came out of it. As a side note, the last question of my job interview as quality assurance manager of the laboratory was “Do you like wine?, I said I didn’t. They said, “you’re hired”.

In 1999, I decided to apply my quality management insights to the web. I quit my job in the wine laboratory. I immediately started work on answering the question, “What does quality mean for a web user?” That also means answering this other question: "How can one evaluate, manage and guarantee the quality of a website?"

Quality assurance (QA) is defined as:

“A program for the systematic monitoring and evaluation of the various aspects of a project, service, or facility to ensure that standards of quality are being met.”
Read the article (9 min read)
Smashing Magazine

Smashing Magazine

Reasons To Build A CRM-Powered Website For Your Business

Most businesses today rely on simple brochure websites for their online presence. These tend to be static websites with a few pages giving core information about the business and details on products and services offered. Although these are relatively cheap and less complicated to develop than a site that offers more advanced user experiences, a business can lose out on many opportunities to better engage with their customers and close sales.

With more and more businesses coming online and creating brochure websites, shrewd organizations need to stand out from their competitors by providing fluid, memorable, and personalized user experiences on their sites. To convert potential interest in your products and services into actual sales, a business needs to foster relationships with their customers on and off their sites. By integrating CRMs with company websites, a business can substantially upgrade their customers' experiences on their site as well as modernize their internal processes.

Read the article (5 min read)
Smashing Magazine

Smashing Magazine

Reducing The Need For Pseudo-Elements

Per the W3C spec, “a pseudo-element represents an element not directly present in the document tree". They have been around since version 1 of the CSS specification, when ::first-letter and ::first-line were introduced. The popular ::before and ::after pseudo-elements were added in version 2 — these represent content that does not exist in the source document at all. They can be thought of as two extra elements you can “tack onto” their originating element. When front-end developers hear “pseudo-elements”, we think of ::before and ::after more often than not, as we use them in various ways to add decorations to our elements.

There are additional pseudo-elements beyond these. They are listed in the spec across three categories: typographic, highlight, and tree-abiding.

Interestingly, after years of web development, I never found myself using ::first-line, but it’s pretty neat and responds well to window resizing! Check it out.

Read the article (3 min read)
Smashing Magazine

Smashing Magazine

The Power Of Pen And Paper Sketching

Need to design something? It can be tempting to start with a computer-based tool, e.g. wireframing software like Balsamiq, or design tools like Photoshop or Figma. These have their place, but I would recommend stepping back and starting with the humble pen and paper.

Sketching by hand can feel unfamiliar and uncomfortable to those who don’t feel artistically inclined, but the flexibility of hand-sketches combined with our imagination means we can work through more ideas and form a better design direction faster than we could than if we started with a more concrete, computer-based solution.

Read the article (4 min read)
Smashing Magazine

Smashing Magazine

Orchestrating Complexity With Web Animations API

There’s no middle ground between simple transitions and complex animations. You’re either fine with what CSS Transitions and Animations provide or you suddenly need all the power you can get. Web Animations API gives you a lot of tools to work with animations. But you need to know how to handle them. This article will walk you through the main points and techniques that might help you deal with complex animations while staying flexible.

Before we dive into the article it is vital that you’re familiar with the basics of the Web Animations API and JavaScript. To make it clear and avoid distraction from the problem at hand the code examples provided are plain. There won’t be anything more complex than functions and objects. As nice entry points into animations themselves I would suggest MDN as a general reference, Daniel C. Wilson’s excellent series, and

Read the article (5 min read)
Smashing Magazine

Smashing Magazine

Web Design Done Well: Excellent Editorial

A lot of web design talk concerns itself with what goes on around content. Page speed, design systems, search engine optimization, frameworks, accessibility — the list goes on and on. This gives us at Smashing Magazine plenty to write about, which is great, though it’s worth reminding ourselves what it’s all in service of.

In this third edition of our web design done well series, we’re honing in on the beating heart of many websites: content. More specifically, editorial content. The Web has given storytellers an incredible selection of tools to work with, and as an occasional semi-competent journalist myself, I love a good scoop.

What follows are examples of web technologies being woven in with editorial content to take it to the next level. We’ll then close with broader tips on thinking creatively about digital content. Even now, overwhelmed by the content production line, the good stuff still shines through.

Reuters Lean Into Swiping

Read the article (4 min read)
Smashing Magazine

Smashing Magazine

Using SWR React Hooks With Next.js’ Incremental Static Regeneration (ISR)

If you’ve ever used Incremental Static Regeneration (ISR) with Next.js, you may have found yourself sending stale data to the client. This occurs when you are revalidating the page on the server. For some websites this works, but for others (such as Hack Club’s Scrapbook, a site built by @lachlanjc that I help maintain), the user expects the data to be kept up to date.

The first solution that comes to mind may be to simply server side render the pages, ensuring that the client is always sent the most up to date data. However, fetching large chunks of data before rendering can slow down the initial page load. The solution used in Scrapbook was to use the SWR library of React hooks to update the cached page from the server with client side data fetching. This approach ensures that users still have a good experience, that the site is fast and that the data is kept up to date.

Meet SWR

Read the article (4 min read)
Smashing Magazine

Smashing Magazine

Developer Decisions For Building Flexible Components

In the real world, content often differs vastly from the neat, perfectly fitting content presented in designs. Added to that, on the modern web, users have an ever-increasing range of options for how they access the sites we build.

In this article, we’ll walk through the process of taking a seemingly simple design for a text-and-media component and deciding how best to translate it into code, keeping in mind the needs of both users and content authors. We’re not going to delve into how to code it — rather, the factors that will determine our development decisions. We’ll consider the questions we need to ask (both ourselves and other stakeholders) at every step.

Changing Our Development Mindset

Read the article (5 min read)