Home/Frontend
Topic

Frontend

2,065 articles on Frontend.

13,309 articles
Frontend — No-Jank CSS Stripes

No-Jank CSS Stripes

My mind goes immediately to repeating-linear-gradient and hard-stop gradients when thinking of creating stripes in CSS. You make one stripe by using the same

CCChris Coyier·February 1, 2021Frontend
Frontend — Things You Can Do With CSS Today — Smashing Magazine

Things You Can Do With CSS Today — Smashing Magazine

The present and future of CSS are very bright indeed and if you take a pragmatic, progressive approach to your CSS, then things will continue to get better and better on your projects, too. Some of the really handy powers CSS gives you might have slipped you by, so in this article, Andy Bell will take a look into masonry layout, :is selector, clamp(), ch and ex units, updated text decoration, and

ABAndy BellAndy Bell·February 1, 2021Frontend
Frontend — Bulletproof flag components

Bulletproof flag components

A clever use of CSS grid from Jay Freestone to accomplish a particular variation of the media object design pattern (where the image is centered with the

CCChris Coyier·January 29, 2021Frontend
Frontend — Dynamic Static Typing In TypeScript — Smashing Magazine

Dynamic Static Typing In TypeScript — Smashing Magazine

In this article, we look at some of the more advanced features of TypeScript, like union types, conditional types, template literal types, and generics. We want to formalize the most dynamic JavaScript behavior in a way that we can catch most bugs before they happen. We apply several learnings from all chapters of TypeScript in 50 Lessons, a book we’ve published here on Smashing Magazine late 2020

SBStefan BaumgartnerStefan Baumgartner·January 29, 2021Frontend
Frontend — GreenSock ScrollTrigger

GreenSock ScrollTrigger

High five to the Greensock gang for the ScrollTrigger release. The point of this new plugin is triggering animation when a page scrolls to certain positions,

CCChris Coyier·January 28, 2021Frontend
Frontend — A Whole Website in a Single HTML File

A Whole Website in a Single HTML File

I can’t stop thinking about this site. It looks like a pretty standard fare; a website with links to different pages. Nothing to write home about except

RRRobin RendleRobin Rendle·January 28, 2021Frontend
Frontend — Components: Server-Side vs. Client-Side

Components: Server-Side vs. Client-Side

Building a website in 2021? I’m guessing you’re going to take a component-driven approach. It’s all the chatter these days. React and Vue are everywhere (is

SCSean C DavisSean C Davis·January 28, 2021Frontend
Frontend — The Holy Grail Layout with CSS Grid

The Holy Grail Layout with CSS Grid

How to build a very common layout with CSS grid. Header on the top, footer on the bottom. Two columns, sidebar and main content. This one has navigation above the main content but within that same column.

CCChris Coyier·January 27, 2021Frontend
Frontend — From Design To Developer-Friendly React Code In Minutes With Anima — Smashing Magazine

From Design To Developer-Friendly React Code In Minutes With Anima — Smashing Magazine

The promise of seamless design to code translation goes back to the early WYSIWYG page builders. Despite the admirable goal, their biggest flaw was the code that they generated. Skepticism remains to this day and whenever this idea reappears, the biggest concerns are always related to the quality and maintainability of the code. In this article, Miroslav Bekyarov will show you how to turn our stat

MBMiroslav BekyarovMiroslav Bekyarov·January 26, 2021Frontend
Frontend — The styled-components Happy Path

The styled-components Happy Path

styled-components is a wonderfully powerful styling library for React, and over the years I've learned a lot about how to use it effectively. This article shares my personal “best practices”.

JWJosh W. Comeau·January 25, 2021Frontend
Frontend — Servers: Cool Once Again

Servers: Cool Once Again

There were jokes coming back from the holiday break that JavaScript decided to go all server-side. I think it was rooted in:

CCChris Coyier·January 22, 2021Frontend
Frontend — useStateInCustomProperties

useStateInCustomProperties

In my recent "Custom Properties as State" post, one of the things I mentioned was that theoretically, UI libraries, like React and Vue, could

CCChris Coyier·January 21, 2021Frontend
Frontend — New in Chrome 88: aspect-ratio

New in Chrome 88: aspect-ratio

And it was released yesterday! The big news for us in CSS Land is that the new release supports the aspect-ratio property. This comes right on the heels of

GGGeoff GrahamGeoff Graham·January 20, 2021Frontend
Frontend — Life with ESM

Life with ESM

ESM, meaning ES Modules, meaning JavaScript Modules. Like, import and friends.

CCChris Coyier·January 19, 2021Frontend
Frontend — AnimXYZ

AnimXYZ

There are quite a few CSS animation libraries. They tend to be a pile of class names that you can apply as needed like "bounce" or "slide-right" and it'll...

CCChris Coyier·January 18, 2021Frontend
Frontend — State of JavaScript 2020

State of JavaScript 2020

We rounded up a bunch of published 2020 annual reports right before the year ended and compiled them into a big ol' list. The end of the list called out a

GGGeoff GrahamGeoff Graham·January 18, 2021Frontend
Frontend — Using Grommet In React Applications — Smashing Magazine

Using Grommet In React Applications — Smashing Magazine

In this tutorial, Fortune Ikechi is going to show you how to use Grommet as a UI library for React applications. He’ll use Grommet as a UI library of choice to create a pricing component, this would help you have a better understanding of how to use Grommet. This tutorial will be beneficial to readers who are interested in developing responsive components in their React application using Grommet.

FIFortune Ikechi·January 18, 2021Frontend
Frontend — On Auto-Generated Atomic CSS

On Auto-Generated Atomic CSS

Robin Weser's "The Shorthand-Longhand Problem in Atomic CSS" in an interesting journey through a tricky problem. The point is that when you take on the job of

CCChris Coyier·January 15, 2021Frontend
Frontend — Integrating A Dialogflow Agent Into A React Application — Smashing Magazine

Integrating A Dialogflow Agent Into A React Application — Smashing Magazine

When it comes to building a conversational chat assistant that could be used at a small or enterprise level, Dialogflow would most likely be one of the first options that would show up in your search list — and why wouldn’t it? It offers several features such as the ability to process audio and text inputs, provide dynamic responses using custom webhooks, connect to millions of Google-enabled devi

NVNwani VictoryNwani Victory·January 14, 2021Frontend
Frontend — Animating with Lottie

Animating with Lottie

I believe animation on the web is not only fun, but engaging in such a way that it has converted site visitors into customers. Think of the “Like” button on

IUIdorenyin UdohIdorenyin Udoh·January 11, 2021Frontend
Frontend — CSS Snapshot 2020

CSS Snapshot 2020

I think it's great that the CSS Working Group does these. It's like planting a flag in the ground saying this is what CSS looks like at this specific point in

CCChris Coyier·January 11, 2021Frontend
Frontend — Let's Bring Spacer GIFs Back!

Let's Bring Spacer GIFs Back!

The 90s web gave us many delightful things: web rings, guestbooks, “under construction” animations, and spacer GIFs. In this article, we'll see how I use a Spacer component to solve common layout problems, and why it's often a great tool for the job in the modern web.

JWJosh W. Comeau·January 11, 2021Frontend
Frontend — Styling Code In and Out of Blocks

Styling Code In and Out of Blocks

There is a <code> tag in HTML. I literally just used it to wrap that tag in the previous sentence — so meta. It is an inline-by-default element that

CCChris Coyier·January 6, 2021Frontend
Frontend — Whack-a-Mole: The CSS Edition

Whack-a-Mole: The CSS Edition

We’ve seen the checkbox hack and how it can be used to build a complete state machine in CSS. Today, we’ll take that line of thought a step further and build

WYWill YuWill Yu·January 6, 2021Frontend
Frontend — Custom Properties as State

Custom Properties as State

Here's a fun idea from James Stanley: a CSS file (that presumably updates daily) containing CSS custom properties for "seasonal" colors (e.g. spring is

CCChris Coyier·January 5, 2021Frontend
Frontend — Centering in CSS

Centering in CSS

Adam Argyle has a post over on web.dev digging into this. He starts with the assumption that you need to do vertical centering and horizontal centering. It's

CCChris Coyier·January 1, 2021Frontend
Frontend — Thank You (2020 Edition)

Thank You (2020 Edition)

Heck of a year, eh? Like we do every year, I'd like to give you a huge thanks for reading CSS-Tricks, and recap the year. More downs than ups, all told. Here

CCChris Coyier·December 31, 2020Frontend
Frontend — Accessible SVG Icons

Accessible SVG Icons

The answer to "What is the most accessible HTML for an SVG icon?" isn't one-size-fits all, because what an icon needs to do on a website varies. I'm partial

CCChris Coyier·December 28, 2020Frontend
Frontend — Integrating TypeScript with Svelte

Integrating TypeScript with Svelte

Svelte is one of the newer JavaScript frameworks and it’s rapidly rising in popularity. It’s a template-based framework, but one which allows for arbitrary

ARAdam RackisAdam Rackis·December 24, 2020Frontend
Frontend — A Calendar in Three Lines of CSS

A Calendar in Three Lines of CSS

This article has no byline and is on a website that is even more weirdly specific than this one is, but I appreciate the trick here. A seven-column grid makes

CCChris Coyier·December 24, 2020Frontend