Home/Frontend
Topic

Frontend

1,512 articles on Frontend.

11,739 articles
Frontend — Highlighted code in slides

Highlighted code in slides

I have obsessed about this long enough, I think it’s only fair I (and you!) get some content out of it. When I started writing this article, I was working on my P99 CONF slides. Those slides happen to include some bits of code. And because I’m a perfectionist, I would like this code to be syntax highlighted, like this:  let addr : SocketAddr = config . address . parse () ? ; let ln = TcpListener

AWAmos WengerAmos Wenger·November 23, 2024Frontend
Frontend — Solved by CSS: Donuts Scopes

Solved by CSS: Donuts Scopes

Donut scoping addresses the challenge of preventing parent styles from leaking to nested content. Originating from a 2011 concept by Nicole Sullivan, the issue has evolved, culminating in 2024's @scope at-rule. This allows for more precise CSS styling, safeguarding content from unwanted inheritance while managing global CSS complexities.

JDJuan Diego RodríguezJuan Diego Rodríguez·November 22, 2024Frontend
Frontend — Invoker Commands: Additional Ways to Work With Dialog, Popover… and More?

Invoker Commands: Additional Ways to Work With Dialog, Popover… and More?

Web browsers are experimenting with two HTML attributes — technically, they’re called “invoker commands” — that are designed to invoke popovers, dialogs, and further down the line, all kinds of actions without writing JavaScript. Although, if you do reach for JavaScript, the new attributes come with some new events that we can listen for.

DSDaniel SchwarzDaniel Schwarz·November 20, 2024Frontend
Frontend — Complete CSS Course

Complete CSS Course

Do you subscribe to Piccalilli? You should. If you're reading that name for the first time, that would be none other than Andy Bell running the ship and he's reimagined the site from the ground-up after coming out of hibernation this year. You're likely familiar with Andy's great writing here on CSS-Tricks.

GGGeoff GrahamGeoff Graham·November 19, 2024Frontend
Frontend — Anchoreum: A New Game for Learning Anchor Positioning

Anchoreum: A New Game for Learning Anchor Positioning

You've played Flexbox Froggy before, right? Or maybe Grid Garden? They're both absolute musts for learning the basics of modern CSS layout using Flexbox and CSS Grid. Thomas Park made those and he's back with another game: Anchoreum.

GGGeoff GrahamGeoff Graham·November 12, 2024Frontend
Frontend — State of CSS 2024 Results

State of CSS 2024 Results

The results from this year's survey are fairly fresh off the presses. We took a little time to sit with them and jot down some things we noticed and found interesting.

GGGeoff GrahamGeoff Graham·October 30, 2024Frontend
Frontend — You can use text-wrap: balance; on icons

You can use text-wrap: balance; on icons

The CSS text-wrap property is (rightfully) widely assumed to be used strictly for text elements. But Terrence Eden posted an article on his blog that shows how it can also be used to balance the way other types of elements wrap, including icons.

GGGeoff GrahamGeoff Graham·October 24, 2024Frontend
Frontend — CSS min() All The Things — Smashing Magazine

CSS min() All The Things — Smashing Magazine

Victor Ayomipo experiments with the CSS `min()` function, exploring its flexibility with different units to determine if it is the be-all, end-all for responsiveness. Discover the cautions he highlights against dogmatic approaches to web design based on his findings.

VAVictor AyomipoVictor Ayomipo·October 17, 2024Frontend
Frontend — React at Meta Connect 2024

React at Meta Connect 2024

At Meta, React and React Native are more than just tools; they are integral to our product development and innovation. With over five thousand people at Meta building products and experiences with React every month, these technologies are fundamental to our engineering culture and our ability to quickly build and ship high quality products. In […]

CWChris Wiltz·October 2, 2024Frontend
Frontend — Quick Hit #21

Quick Hit #21

Seeing a lot more headlines decrying JavaScript and pumping up PHP. Always interesting to see which direction the front-end zeitgeist is leaning.

GGGeoff GrahamGeoff Graham·September 20, 2024Frontend
Frontend — From CDNs to Frontend Clouds

From CDNs to Frontend Clouds

Content Delivery Networks (CDNs) and Infrastructure as code (IaC) evolved into the next generation of web application delivery.

VVercel·September 20, 2024Frontend
Frontend — SVG Coding Examples: Useful Recipes For Writing Vectors By Hand — Smashing Magazine

SVG Coding Examples: Useful Recipes For Writing Vectors By Hand — Smashing Magazine

Myriam Frisano explores the basics of hand-coding SVGs with practical examples to demystify the inner workings of common SVG elements. In this guide, you’ll learn about asking the right questions to solve common positioning problems and how to leverage JavaScript so that, by the end, you can add “SVG coding” to your toolbox. You’ll also be able to declare proudly, “I know how to draw literal pictu

MFMyriam FrisanoMyriam Frisano·September 18, 2024Frontend
Frontend — Creating Custom Lottie Animations With SVGator — Smashing Magazine

Creating Custom Lottie Animations With SVGator — Smashing Magazine

Creating ready-to-implement Lottie animations with a single tool is now possible thanks to SVGator’s latest feature updates. In this article, you will learn how to create and animate a Lottie using SVGator, an online animation tool that has zero learning curve if you’re familiar with at least one design tool.

MCMihai CoraMihai Cora·September 17, 2024Frontend
Frontend — Multiple Anchors

Multiple Anchors

Only Chris, right? You'll want to view this in a Chromium browser:

GGGeoff GrahamGeoff Graham·September 16, 2024Frontend
Frontend — Anchor Positioning Quirks

Anchor Positioning Quirks

I am thrilled to say, that from this week onwards, the CSS-Tricks Almanac has an entry for each property, function, and at-rule related to the new Anchor

JDJuan Diego RodríguezJuan Diego Rodríguez·September 10, 2024Frontend
Frontend — The Undeniable Utility Of CSS :has

The Undeniable Utility Of CSS :has

Of all the latest and greatest CSS features, the “:has” pseudo-class wasn’t exactly at the top of my wishlist. Once I started using it, however, I kept discovering incredible things I could do with it. It’s now become a core part of my toolkit! In this blog post, I'll show you some practical real-world problems I solved using “:has”, as well as some wild experiments that blew my mind!

JWJosh W. Comeau·September 9, 2024Frontend
Frontend — Sticky Headers And Full-Height Elements: A Tricky Combination — Smashing Magazine

Sticky Headers And Full-Height Elements: A Tricky Combination — Smashing Magazine

Sticky positioning is one of those CSS features that’s pretty delicate and can be negated by a lot of things, so here’s another one to add to your mental catalog: Sticky elements don’t play nicely if they have to coordinate with other elements to make up a combined height, like `100vh`. Philip Braunen explores why this happens and presents a solution to fix it.

PBPhilip BraunenPhilip Braunen·September 5, 2024Frontend
Frontend — The “Other” C in CSS

The “Other” C in CSS

I think it's worth listening to anything Sara Soueidan has to say. That's especially true if she's speaking at an event for the first time in four years,

GGGeoff GrahamGeoff Graham·August 28, 2024Frontend
Frontend — Generating Unique Random Numbers In JavaScript Using Sets — Smashing Magazine

Generating Unique Random Numbers In JavaScript Using Sets — Smashing Magazine

Want to create more randomized effects in your JavaScript code? The `Math.random()` method alone, with its limitations, won’t cut it for generating unique random numbers. Amejimaobari Ollornwi explains how to generate a series of unique random numbers using the `Set` object, how to use these random numbers as indexes for arrays, and explores some practical applications of randomization.

AOAmejimaobari OllornwiAmejimaobari Ollornwi·August 26, 2024Frontend
Frontend — Callbacks on Web Components?

Callbacks on Web Components?

A gem from Chris Ferdinandi that details how to use custom events to hook into Web Components. More importantly, Chris dutifully explains why custom events

GGGeoff GrahamGeoff Graham·August 22, 2024Frontend
Frontend — RTL Styling 101

RTL Styling 101

A couple of weeks ago I was super excited about publishing my first CSS-Tricks post: "Letter Spacing is Broken. Forget about that though, what's important is

JDJuan Diego RodríguezJuan Diego Rodríguez·August 20, 2024Frontend
Frontend — All About JavaScript Loops

All About JavaScript Loops

Every programming language has loops. Loops perform an operation (i.e., a chunk of work) a number of times, usually once for every item in an array or list,

EMErick MerchantErick Merchant·August 19, 2024Frontend
Frontend — Best Of Pro Scheduler Libraries — Smashing Magazine

Best Of Pro Scheduler Libraries — Smashing Magazine

For teams working remotely across the globe or together in an office, as well as for any group of collaborating users, a scheduler can be a valuable tool indeed. In this post, you’ll find some of the best commercial web scheduler libraries (JavaScript based) with amazing UX and high efficiency that are currently available.

PSPreethi SamPreethi Sam·August 8, 2024Frontend
Frontend — CSS Olympic Rings

CSS Olympic Rings

It was a few years ago during the 2020 Olympics in Tokyo 2020 that I made a demo of animated 3D Olympic rings. I like it, it looks great, and I love the

ASAmit SheenAmit Sheen·August 7, 2024Frontend
Frontend — It’s Time To Talk About “CSS5” — Smashing Magazine

It’s Time To Talk About “CSS5” — Smashing Magazine

Have you ever wondered what happened after CSS3? It’s common knowledge that we never saw CSS4 come after it, yet we have a plethora of new features that have no similar way of defining when they were introduced. The W3C CSS-Next community group is actively searching for better approaches for how we describe the evolution of CSS over time and identify feature sets as effectively as we did with CSS3

BDBrecht De RuyteBrecht De Ruyte·August 5, 2024Frontend
Frontend — CSS Functions and Mixins Module Notes

CSS Functions and Mixins Module Notes

Most days, I'm writing vanilla CSS. Thanks to CSS variables and nesting, I have fewer reasons to reach for Sass or any other preprocessor. The times I reach

GGGeoff GrahamGeoff Graham·July 31, 2024Frontend
Frontend — Flags as Code in Next.js

Flags as Code in Next.js

The Flags SDK is a free open-source library that gives developers the tools they need to use feature flags in Next.js and SvelteKit applications.

VVercel·July 26, 2024Frontend
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 — 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