Search
The Differences in Web Hosting (Go with the Happy Path)
10.2.2021
One of our readers checked out “Helping a Beginner Understand Getting a Website Live” and had some follow up questions specifically about hosting providers. Here’s what they asked:
What’s the difference between hosting providers? For example, what is the difference...
A table with both a sticky header and a sticky first column
10.2.2021
We’ve covered that individual <table> cells, <th> and <td> can be position: sticky. It’s pretty easy to make the header of a table stick to the top of the screen while scrolling through a bunch or rows (like this …
The post A table with both a sticky...
Nested Media Queries
9.2.2021
We don’t have “regular” nesting in CSS. Maybe this becomes a thing someday, or something like it. That would be cool, although that pre-spec doesn’t mention anything about media queries. I’d hope we get that right out of the gate …
The post Nested Media Queries...
Recreating Game Elements for the Web: The Among Us Card Swipe
9.2.2021
As a web developer, I pay close attention to the design of video games. From the HUD in Overwatch to the catch screen in Pokemon Go to hunting in Oregon Trail, games often have interesting mechanics and satisfying interactions, …
The post Recreating Game Elements for the Web: The Among...
SVG within CSS
8.2.2021
Stefan Judis has a “Today I Learned” (TIL) post explaining how SVGs filters can be inlined in CSS. The idea is that CSS has the filter property which supports some built-in functions, like grayscale(100%) and stuff like that.
But …
The post SVG within CSS appeared first...
Animating a CSS Gradient Border
8.2.2021
This little trick for gradient borders is super useful:
.border-gradient {
border: 5px solid;
border-image-slice: 1;
border-image-source: linear-gradient(to left, #743ad5, #d53a9d);
}
Here’s some basic demos from our article on the subject. Sephanie Eckles was sharing around the idea...
(Jay Freestone’s) Front-end predictions for 2021
8.2.2021
React framework maturity, early container queries, WASM adoption, and monoliths. I’ll take all four, please. Not feeling like a particularly front-end-y? Jay says:
Interestingly, the biggest developments in the front-end are unlikely to be traditionally front-end concerns. Back...
Exploring the Complexities of Width and Height in CSS
5.2.2021
The following article is co-authored by Uri Shaked and Michal Porag.
Let’s explore the complexities of how CSS computes the width and height dimensions of elements. This is based on countless late-night hours debugging and fiddling with lots of …
The post Exploring the Complexities of Width...
Weekly Platform News: The :not() pseudo-class, Video Media Queries, clip-path: path() Support
5.2.2021
Hey, we’re back with weekly updates about the browser landscape from Šime Vidas.
In this week’s update, the CSS :not pseudo class can accept complex selectors, how to disable smooth scrolling when using “Find on page…” in Chrome, Safari’s …
The post Weekly...
Some React Blog Posts I’ve Bookmarked and Read Lately
5.2.2021
The React Hooks Announcement In Retrospect: 2 Years Later — Ryan Carniato considers hooks to be the most significant turning point in front end in the past five years, but he also says hooks have muddied the waters as well.
…
The post Some React Blog Posts I’ve Bookmarked and Read...
Some Typography Blog Posts I’ve Bookmarked and Read Lately
4.2.2021
Font-size: An Unexpectedly Complex CSS Property — From Manish Goregaokar in 2017. Of many oddities, I found the one where font: medium monospace renders at 13px where font: medium sans-serif renders at 16px particularly weird.
The good line-height — Since
…
The post Some Typography Blog...
Lazy Load Routes in Vue with webpack Dynamic Comments
4.2.2021
The way routing works in JavaScript is usually that you specify which relative URL pattern you want for which component to render. So for /about you want the <About /> component to render. Let’s take a look at how to …
The post Lazy Load Routes in Vue with webpack Dynamic Comments...
Algolia
4.2.2021
Algolia is for search. Literally any website can take advantage of Algolia-powered search. You put JSON data (“records”) in, and then you can search them at lightning speed. The magic of Algolia is that they help you with both of …
The post Algolia appeared first...
Some Performance Blog Posts I’ve Bookmarked and Read Lately
3.2.2021
Back/forward cache — I always assumed browsers just do fancy stuff with the back/forward buttons and us developers had very little control. Philip Walton tells us it’s critical that we understand “what makes pages eligible (and ineligible) for bfcache to
…
The post Some...
Going From Solid to Knockout Text on Scroll
3.2.2021
Here’s a fun CSS trick to show your friends: a large title that switches from a solid color to knockout text as the background image behind it scrolls into place. And we can do it using plain ol’ HTML and …
The post Going From Solid to Knockout Text on Scroll appeared first...
The Web is for More Than Document Viewing
3.2.2021
I poked at a tweet from Ken Kocienda over the weekend:
“Water not wet” reports man standing in ocean. https://t.co/5oUUdWARTU
— Chris Coyier (@chriscoyier) January 31, 2021
I don’t know Ken, so I feel a little bad for being harsh. …
The post The Web is for More Than Document...
I Saw Two Mega Menus Today…
2.2.2021
One was the footer of an (older) U.S. Government website. The other was the navigation for AWS services from the AWS Console.
The post I Saw Two Mega Menus Today… appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter
Dynamically Switching From One HTML Element to Another in Vue
2.2.2021
A friend once contacted me asking if I had a way to dynamically change one HTML element into another within Vue’s template block. For instance, shifting a <div> element to a <span> element based on some criteria. The trick was …
The post Dynamically Switching From One HTML...
“Cancelable” Smooth Scrolling
2.2.2021
Here’s the situation: Your site offers a “scroll back to top” button, and you’ve implemented smooth scrolling. As the page scrolls back to the top, users see something that catches their eye and they want to stop the scrolling, so …
The post “Cancelable”...
Open Web Docs
2.2.2021
Robert Nyman:
Open Web Docs was created to ensure the long-term health of web platform documentation on de facto standard resources like MDN Web Docs, independently of any single vendor or organization. Through full-time staff, community management, and
…
The post Open Web Docs...