Home/Frontend
Topic

Frontend

1,551 articles on Frontend.

11,834 articles
Frontend — "If" CSS Gets Inline Conditionals

"If" CSS Gets Inline Conditionals

A few sirens went off a couple of weeks ago when the CSS Working Group (CSSWG) resolved to add an if() conditional to the CSS Values Module Level 5

GGGeoff GrahamGeoff Graham·July 9, 2024Frontend
Frontend — Quick Hit #8

Quick Hit #8

CSS Meditation #8: .work + .life { border: 10px solid #000; }

GGGeoff GrahamGeoff Graham·June 24, 2024Frontend
Frontend — Quick Hit #6

Quick Hit #6

CSS Meditation #6: The color space is always calc(rgb(0 255 0)+er) on the other side of the fence.

GGGeoff GrahamGeoff Graham·June 24, 2024Frontend
Frontend — Quick Hit #4

Quick Hit #4

CSS Meditation #4: Select, style, adjust. Select, style, adjust. Select, sty…

GGGeoff GrahamGeoff Graham·June 24, 2024Frontend
Frontend — Quick Hit #2

Quick Hit #2

CSS Meditation #2: Who gives a flying frick what constitutes a “programming” language.

GGGeoff GrahamGeoff Graham·June 24, 2024Frontend
Frontend — Quick Hit #1

Quick Hit #1

CSS Meditation #1: If the code works as expected and it fits your mental model, then it’s perfect.

GGGeoff GrahamGeoff Graham·June 24, 2024Frontend
Frontend — Uniting Web And Native Apps With 4 Unknown JavaScript APIs — Smashing Magazine

Uniting Web And Native Apps With 4 Unknown JavaScript APIs — Smashing Magazine

Have you heard of the Screen Orientation API? What about the Device Orientation API, Vibration API, or the Contact Picker API? Juan Diego Rodriguez is interested in these under-the-radar web features and discusses how they can be used to create more usable and robust progressive web apps if and when they gain broader support.

JDJuan Diego RodriguezJuan Diego Rodriguez·June 20, 2024Frontend
Frontend — What Are CSS Container Style Queries Good For? — Smashing Magazine

What Are CSS Container Style Queries Good For? — Smashing Magazine

What are these CSS Container Style Queries, and why should you use them? Juan Diego Rodríguez delves deeply into style queries, and not at the syntax level, but at what exactly they are solving and what sort of use cases you would find yourselves reaching for them in your work if and when they gain browser support.

JDJuan Diego RodriguezJuan Diego Rodriguez·June 14, 2024Frontend
Frontend — MLow: Meta’s low bitrate audio codec

MLow: Meta’s low bitrate audio codec

At Meta, we support real-time communication (RTC) for billions of people through our apps, including WhatsApp, Instagram, and Messenger. We are working to make RTC accessible by providing a high-quality experience for everyone – even those who might not have the fastest connections or the latest phones. As more and more people have relied on […]

CWChris Wiltz·June 13, 2024Frontend
Frontend — Useful CSS Tips And Techniques — Smashing Magazine

Useful CSS Tips And Techniques — Smashing Magazine

The times for CSS have probably never been more exciting than today. In this quick read, we’ve got some useful CSS tips and techniques for you that you can apply to your work right away. Let’s dive deeper into self-modifying CSS variables, hanging punctuation, and more.

CMCosima MielkeCosima Mielke·June 7, 2024Frontend
Frontend — Test-Driving HTML Templates

Test-Driving HTML Templates

When building a server-side rendered web application, it is valuable to test the HTML that's generated through templates. While these can be tested through end-to-end tests running in the browser, such tests are slow and more work to maintain than unit tests. Unit tests, written in the server-side environment, can check for valid HTML, and extract elements with CSS selectors to test the details of

MVMatteo Vaccari·June 5, 2024Frontend
Frontend — CSS Length Units

CSS Length Units

A comprehensive guide covering nine types of lengths that CSS uses to size elements in terms of dimensions, space, time, and even sound.

GGGeoff GrahamGeoff Graham·June 3, 2024Frontend
Frontend — Promises From The Ground Up

Promises From The Ground Up

The “Promises” API is a surprisingly tricky part of modern JavaScript. Without the right context, it doesn’t make much sense at all! In this tutorial, you’ll build an intuition for how Promises work by getting a deeper understanding of JavaScript and its limitations.

JWJosh W. Comeau·June 3, 2024Frontend
Frontend — In Praise Of The Basics — Smashing Magazine

In Praise Of The Basics — Smashing Magazine

What does it mean to learn the “basics”, or fundamentals, of front-end web development? Is starting with HTML and CSS still the best entry point to learn how to make websites and apps when we have a seemingly endless supply of frameworks? Geoff Graham thinks so and discusses why you might consider going “back to basics” to start or move forward in your career.

GGGeoff GrahamGeoff Graham·May 30, 2024Frontend
Frontend — Switching It Up With HTML’s Latest Control — Smashing Magazine

Switching It Up With HTML’s Latest Control — Smashing Magazine

After years of relying on checkbox hacks to create a “switch” control for forms that toggle between two states, HTML may be gaining a native way to go about it by adding a `switch` attribute to checkbox inputs. Daniel Yuschick walks us through a first impression of switch controls and discusses current and ongoing considerations that need to be explored further before it is ready for prime time.

DYDaniel YuschickDaniel Yuschick·May 24, 2024Frontend
Frontend — Modern CSS Layouts: You Might Not Need A Framework For That — Smashing Magazine

Modern CSS Layouts: You Might Not Need A Framework For That — Smashing Magazine

It’s easy to get lost in a sea of CSS frameworks and libraries, each promising easier styling and smoother layouts. Brecht De Ruyte demonstrates four CSS utility classes (plus a bonus) using techniques that allow them to be used practically anywhere you need a particular layout — be it Grid or Flexbox — with configurable options.

BDBrecht De RuyteBrecht De Ruyte·May 22, 2024Frontend
Frontend — Beyond CSS Media Queries — Smashing Magazine

Beyond CSS Media Queries — Smashing Magazine

Juan Diego Rodriguez explains why media queries still occupy a vital role in responsive layouts; only they are now one tool in a larger toolbox with modern techniques that are best when used together.

JDJuan Diego RodriguezJuan Diego Rodriguez·May 16, 2024Frontend
Frontend — Converting Plain Text To Encoded HTML With Vanilla JavaScript — Smashing Magazine

Converting Plain Text To Encoded HTML With Vanilla JavaScript — Smashing Magazine

What do you do when you need to convert plain text into formatted HTML? Perhaps you reach for Markdown or manually write in the element tags yourself. Or maybe you have one or two of the dozens of online tools that will do it for you. In this tutorial, Alexis Kypridemos picks those tools apart and details the steps for how we can do it ourselves with a little vanilla HTML, CSS, and JavaScript.

AKAlexis KypridemosAlexis Kypridemos·April 17, 2024Frontend
Frontend — CSS in React Server Components

CSS in React Server Components

You can’t make an omelette without cracking a few eggs, and when the core React team unveiled their vision for the future of React, some of my favourite libraries got scrambled 😅. In this blog post, we’re going to explore the compatibility issues between React Server Components and CSS-in-JS libraries like styled-components. You’ll understand what the issue is, what the options are, and what’s on

JWJosh W. Comeau·April 15, 2024Frontend
Frontend — Sliding 3D Image Frames In CSS — Smashing Magazine

Sliding 3D Image Frames In CSS — Smashing Magazine

Creating 3D effects in CSS isn’t an entirely new concept, but typical approaches use additional elements in the markup and pseudo-elements in the styles to pull it off. Temani Afif applies 3D effects and sliding transitions to a single `` using clever CSS techniques that demonstrate advanced, modern styling practices.

TATemani AfifTemani Afif·April 12, 2024Frontend
Frontend — We've added JavaScript-native RPC to Cloudflare Workers

We've added JavaScript-native RPC to Cloudflare Workers

Cloudflare Workers now features a built-in RPC (Remote Procedure Call) system for use in Worker-to-Worker and Worker-to-Durable Object communication, with absolutely minimal boilerplate. We've designed an RPC system so expressive that calling a remote service can feel like using a library

CCloudflare·April 5, 2024Frontend
Frontend — Infinite-Scrolling Logos In Flat HTML And Pure CSS — Smashing Magazine

Infinite-Scrolling Logos In Flat HTML And Pure CSS — Smashing Magazine

Remember the HTML `` element? It’s deprecated, so it’s not like you’re going to use it when you need some sort of horizontal auto-scrolling feature. That’s where CSS comes in because it has all the tools we need to pull it off. Silvestar Bistrović demonstrates a technique that makes it possible with a set of images and as little HTML as possible.

SBSilvestar BistrovicSilvestar Bistrovic·April 2, 2024Frontend
Frontend — The Power of :has() in CSS

The Power of :has() in CSS

Hey all you wonderful developers out there! In this post we are going to explore the use of :has() in your next web project. :has() is relatively newish but

CDChris DeMarsChris DeMars·March 29, 2024Frontend
Frontend — Bringing HDR photo support to Instagram and Threads

Bringing HDR photo support to Instagram and Threads

Meta’s family of apps serves trillions of image download requests every day. And if you’re into high-quality images, you’ve probably noticed that Instagram and Threads have added support for high dynamic range (HDR) photos. Now people on Threads and Instagram can upload and share images that are more true-to-life, with the full color and range […]

CWChris Wiltz·March 26, 2024Frontend
Frontend — Modern CSS Tooltips And Speech Bubbles (Part 2) — Smashing Magazine

Modern CSS Tooltips And Speech Bubbles (Part 2) — Smashing Magazine

In Part 1 of this series, Temani Afif explored different CSS techniques to create tooltip shapes. The main challenge was to rely on a single element and create optimized code that could easily be controlled using CSS variables to update the size, shape, and position of the tail. In this second part, you are going explore more shapes.

TATemani AfifTemani Afif·March 8, 2024Frontend
Frontend — Modern CSS Tooltips And Speech Bubbles (Part 1) — Smashing Magazine

Modern CSS Tooltips And Speech Bubbles (Part 1) — Smashing Magazine

Tooltips are a very common pattern used in CSS for years. There are a lot of ways to approach tooltips in CSS, though some evoke headaches with all the magic numbers they require. In this article, Temani Afif presents modern techniques to create tooltips with the smallest amount of markup and the greatest amount of flexibility.

TATemani AfifTemani Afif·March 1, 2024Frontend
Frontend — How To Center a Div

How To Center a Div

Back in the day, centering an element was one of the trickiest things in CSS. As the language has evolved, we’ve been given lots of new tools we can use… But how do we pick the best option? When do we use Flexbox, or CSS Grid, or something else? Let's dig into it.

JWJosh W. Comeau·February 13, 2024Frontend
Frontend — How To Draw Radar Charts In Web — Smashing Magazine

How To Draw Radar Charts In Web — Smashing Magazine

A radar chart — also commonly called a spider chart — is yet another way to visualize data and make connections. Radar charts are inherently geometric, making them both a perfect fit and fun to make with CSS, thanks to the `polygon()` function. Read along as Preethi Sam demonstrates the process and sprinkles it with a pinch of JavaScript to make a handy, reusable component.

PSPreethi SamPreethi Sam·February 9, 2024Frontend
Frontend — CSS Blurry Shimmer Effect — Smashing Magazine

CSS Blurry Shimmer Effect — Smashing Magazine

Taking inspiration from shadows, author Yair Even Or creates the same sort of thing, only with a blurring effect in place of the shadow. Read along for a step-by-step explanation of how it comes together using a combination of masks, gradients, and the good ol’ `backdrop-filter` property.

YEYair Even OrYair Even Or·January 25, 2024Frontend
Frontend — The View Transitions API And Delightful UI Animations (Part 2) — Smashing Magazine

The View Transitions API And Delightful UI Animations (Part 2) — Smashing Magazine

The View Transitions API is a new — but game-changing — feature that allows us to do the types of reactive state-based UI and page transitions that have traditionally been exclusive to JavaScript frameworks. In the second half of this mini two-part series, Adrian Bece expands on the demos from the first article to demonstrate how the View Transitions API can be used to transition not just elements

ABAdrian BeceAdrian Bece·January 2, 2024Frontend