Your Web News in One Place

Articles by CSS Tricks from January 2021

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
< Return to CSS Tricks details.
09:44 pm GMT - Fri, January 29, 2021
CSS Tricks 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 title) without any magic numbers anything that...
03:45 pm GMT - Fri, January 29, 2021
CSS Tricks Styling Web Components
Nolan Lawson has a little emoji-picker-element that is awfully handy and incredibly easy to use. But considering you’d probably be using it within your own app, it should be style-able so it can...
10:07 pm GMT - Thu, January 28, 2021
CSS Tricks 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, as well as when certain elements are in th...
08:23 pm GMT - Thu, January 28, 2021
CSS Tricks A Whole Website in a Single HTML File
I cant 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 that… the whole website is contained withi...
03:48 pm GMT - Thu, January 28, 2021
CSS Tricks Components: Server-Side vs. Client-Side
Building a website in 2021? Im guessing youre going to take a component-driven approach. Its all the chatter these days. React and Vue are everywhere (is Angular still a thing?), while other emerging ...
03:46 pm GMT - Thu, January 28, 2021
CSS Tricks Embedding an Interactive Analytics Component with Cumul.io and Any Web Framework
In this article, we explain how to build an integrated and interactive data visualization layer into an application with Cumul.io. To do so, weve built a demo application that visualizes Spotify Playl...
04:04 pm GMT - Wed, January 27, 2021
CSS Tricks 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 col...
08:34 pm GMT - Tue, January 26, 2021
CSS Tricks Monorepo
I’m not exactly a large-scale DevOps guy, but I can tell ya we’ve been moving back toward a monorepo at CodePen and it’s rife with advantages over a system with lots of smaller repos...
03:34 pm GMT - Tue, January 26, 2021
CSS Tricks Re-Creating the Porky Pig Animation from Looney Tunes in CSS
You know, Porky Pig coming out of those red rings announcing the end of a Looney Tunes cartoon. Well get there, but first we need to cover some CSS concepts.Everything in CSS is a box, or rectangle. R...
09:41 pm GMT - Mon, January 25, 2021
CSS Tricks Tech Stacks and Website Longevity
Steren Giannini in “My stack will outlive yours”:My stack requires no maintenance, has perfect Lighthouse scores, will never have any security vulnerability, is based on open standards, is...
03:21 pm GMT - Mon, January 25, 2021
CSS Tricks Checkerboard Reveal
Back when I was 10, I remember my cousin visiting our house. He was (and still is) a cool kid, the kind who’d bring his own self-programmed chess game on a floppy disk. And his version of chess ...
10:13 pm GMT - Fri, January 22, 2021
CSS Tricks You want minmax(10px, 1fr) not 1fr
There are a lot of grids on the web like this:.grid { display: grid; grid-template-columns: repeat(3, 1fr);}My message is that what they really should be is:.grid { display: grid; grid-template-co...
03:41 pm GMT - Fri, January 22, 2021
CSS Tricks 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:The Basecamp gang releasing Hotwire, which looks like marketing panache arou...
08:47 pm GMT - Thu, January 21, 2021
CSS Tricks 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 automatically map the state they manage o...
03:36 pm GMT - Thu, January 21, 2021
CSS Tricks How to Play and Pause CSS Animations with CSS Custom Properties
Lets have a look CSS @keyframes animations, and specifically about how you can pause and otherwise control them. There is a CSS property specifically for it, that can be controlled with JavaScript, bu...
03:35 pm GMT - Thu, January 21, 2021
CSS Tricks What if you could cut your hosting costs by 80%? Webiny Serverless CMS makes it possible.
Are you hosting one or more websites and are using a headless CMS? Are you hosting your CMS on a virtual machine or a container, or using a SaaS solution? If so, then you’re paying for the uptim...
01:29 am GMT - Thu, January 21, 2021
CSS Tricks Scrollbars on Hover
First, scrollbars are a usability and accessibility thing. Second, a rule of thumb: if an area scrolls, it should have a visible scrollbar. But the web is a big place and I like tricks, so I’m g...
06:54 pm GMT - Wed, January 20, 2021
CSS Tricks 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 Safari announcing support for it in Safari T...
03:46 pm GMT - Wed, January 20, 2021
CSS Tricks Lightweight Form Validation with Alpine.js and Iodine.js
Many users these days expect instant feedback in form validation. How do you achieve this level of interactivity when youre building a small static site or a server-rendered Rails or Laravel app? Alpi...
06:54 pm GMT - Tue, January 19, 2021
CSS Tricks Life with ESM
ESM, meaning ES Modules, meaning JavaScript Modules. Like, import and friends.Browsers support it these days. There is plenty of nuance, but as long as you’ve dropped IE, the door is fairly open...
06:53 pm GMT - Tue, January 19, 2021
CSS Tricks Netlify Edge Handlers
Netlify Edge Handlers are in Early Access (you can request it), but they are super cool and I think they are worth wrapping your brain around now. I think they change the nature of what Jamstack is an...
03:47 pm GMT - Tue, January 19, 2021
CSS Tricks On Type Patterns and Style Guides
Over the last six years or so, Ive been using these things Ive been calling type patterns in my web design work, and theyve worked out pretty well for me. Ill dig into what they are and how they can &...
08:40 pm GMT - Mon, January 18, 2021
CSS Tricks Rendering the WordPress philosophy in GraphQL
WordPress is a CMS thats coded in PHP. But, even though PHP is the foundation, WordPress also holds a philosophy where user needs are prioritized over developer convenience. That philosophy establishe...
03:41 pm GMT - Mon, January 18, 2021
CSS Tricks 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… do those...
03:40 pm GMT - Mon, January 18, 2021
CSS Tricks 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 couple of in-progress surveys, one of w...
08:48 pm GMT - Fri, January 15, 2021
CSS Tricks 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 converting something HT...
07:26 pm GMT - Fri, January 15, 2021
CSS Tricks 3 Approaches to Integrate React with Custom Elements
In my role as a web developer who sits at the intersection of design and code, I am drawn to Web Components because of their portability. It makes sense: custom elements are fully-functional HTML elem...
12:48 am GMT - Fri, January 15, 2021
CSS Tricks Proper Tabbing to Interactive Elements in Firefox on macOS
I just had to debug an issue with focusable elements in Firefox. Someone reported to me that when tabbing to a certain element within a CodePen embed, it shot the scroll position to the top of the pag...
12:45 am GMT - Fri, January 15, 2021
CSS Tricks Building an Ethereum app using Redwood.js and Fauna
With the recent climb of Bitcoins price over 20k $USD, and to it recently breaking 30k, I thought its worth taking a deep dive back into creating Ethereum applications. Ethereum, as you should know by...
03:54 pm GMT - Thu, January 14, 2021
CSS Tricks How to Make GraphQL and DynamoDB Play Nicely Together
Serverless, GraphQL, and DynamoDB are a powerful combination for building websites. The first two are well-loved, but DynamoDB is often misunderstood or actively avoided. Its often dismissed by folks ...
10:44 pm GMT - Wed, January 13, 2021
CSS Tricks Dynamic, Conditional Imports
With ES Modules, you can natively import other JavaScript. Like confetti, duh:import confetti from 'https://cdn.skypack.dev/canvas-confetti';confetti();That import statement is just gonna run. There i...
10:44 pm GMT - Wed, January 13, 2021
CSS Tricks Fading in a Page on Load with CSS & JavaScript
Louis Lazaris demonstrates a very simple way of doing this.Hide the body (with JavaScript) right away with with a CSS class that declares opacity: 0Wait for all the JavaScript to execute Unhide the bo...
03:56 pm GMT - Wed, January 13, 2021
CSS Tricks Two Issues Styling the Details Element and How to Solve Them
In the not-too-distant past, even basic accordion-like interactions required JavaScript event listeners or some CSS trickery. And, depending on the solution used, editing the underlying HTML could get...
03:53 pm GMT - Wed, January 13, 2021
CSS Tricks A (terrible?) way to do footnotes in HTML
Terence Eden poked around with a way to do footnotes using the <details>/<summary> elements. I think it’s kind of clever. Rather than a hyperlink that jumps down to explain the f...
11:20 pm GMT - Tue, January 12, 2021
CSS Tricks Fixing Smooth Scrolling with Find-on-Page
Back when we released the v17 design (we’re on v18 now) of this site. I added html { scroll-behavior: smooth; } to the CSS. Right away, I got comments like this (just one example):… when y...
08:14 pm GMT - Tue, January 12, 2021
CSS Tricks WordPress.com Business Plan (Business-Class WordPress Hosting Support from WordPress Experts)
WordPress.com is where you go to use WordPress that is completely hosted for you. You don’t have to worry about anything but building your site. There is a free plan to get started with, and pai...
08:14 pm GMT - Tue, January 12, 2021
CSS Tricks The WordPress.com Business Plan is way more powerful than you think
WordPress.com is where you go to use WordPress that is completely hosted for you. You don’t have to worry about anything but building your site. There is a free plan to get started with, and pai...
03:53 pm GMT - Tue, January 12, 2021
CSS Tricks How to Add Commas Between a List of Items Dynamically with CSS
Imagine you have a list of items. Say, fruit: Banana, Apple, Orange, Pear, NectarineWe could put those commas (,) in the HTML, but lets look at how we could do that in CSS instead, giving us an extra ...
03:44 pm GMT - Tue, January 12, 2021
CSS Tricks Building Flexible Components With Transparency
Good thinking from Paul Herbert on the Cloudfour blog about colorizing a component. You might look at a design comp and see a card component with a header background of #dddddd, content background of ...
12:18 am GMT - Tue, January 12, 2021
CSS Tricks Careful When Changing the Display of `summary`
I got a very helpful bug report the other day (thanks Kilian!) about the <details> element in a blog post of mine not showing the default ▶ icon, and thus looking rather like any olR...
09:54 pm GMT - Mon, January 11, 2021
CSS Tricks Flashs Web Tech Legacy
Tiffany B. Brown on how Flash paved the way for some things we might think of as fairly modern web technologies:Flash wasn’t just good for playing multimedia. It was also good for manipulating i...
04:09 pm GMT - Mon, January 11, 2021
CSS Tricks 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 Twitter. When you like a tweet, tiny colorful...
04:08 pm GMT - Mon, January 11, 2021
CSS Tricks 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 time. They do specifically sa...
12:48 am GMT - Sat, January 9, 2021
CSS Tricks Painters Tape and Fault Tolerance
One of my favorite things in the world is painters tape (also called masking tape). It seems like something silly: some tape you put on a wall when youre painting to avoid getting paint on the wall. T...
09:23 pm GMT - Fri, January 8, 2021
CSS Tricks `aspect-ratio` is going to deprecate FitVids
Jen was just tweetin’ about how the latest Safari Technical Preview has aspect-ratio. Looks like Chrome and Firefox both have it behind a flag, so with Safari joining the party, we’ll all ...
03:51 pm GMT - Fri, January 8, 2021
CSS Tricks Svelte and Spring Animations
Spring animations are a wonderful way to make UI interactions come to life. Rather than merely changing a property at a constant rate over a period of time, springs allow us to move things using sprin...
11:37 pm GMT - Thu, January 7, 2021
CSS Tricks Creating CSS APIs without JavaScript With the datasette-css-properties plugin
Simon Willison has a project called Datasette, an open source multi-tool for exploring and publishing data. I’m not sure I’m qualified to explain it, but it’s like a tool to make han...
03:50 pm GMT - Thu, January 7, 2021
CSS Tricks Theming and Theme Switching with React and styled-components
I recently had a project with a requirement to support theming on the website. It was a bit of a strange requirement, as the application is mostly used by a handful of administrators. An even bigger s...
03:48 pm GMT - Thu, January 7, 2021
CSS Tricks Win a Copy of Zell Liews Learn JavaScript Course
Zell Liew is giving away 10 free copies of his Learn JavaScript course, and entering the giveaway is pretty easy: sign up for his newsletter. I’ve personally subscribed for some time now and all...
09:31 pm GMT - Wed, January 6, 2021
CSS Tricks 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 denotes any sort of code. It has default (us...
03:39 pm GMT - Wed, January 6, 2021
CSS Tricks Whack-a-Mole: The CSS Edition
Weve seen the checkbox hack and how it can be used to build a complete state machine in CSS. Today, well take that line of thought a step further and build a simple game of Whack-A-Mole, where the pla...
10:42 pm GMT - Tue, January 5, 2021
CSS Tricks Some Recent Videos About Websites That Are Pretty Good
Here’s a little hodgepodge of videos I’ve recently bookmarked (and watched). I couldn’t decide if each one of them should be a separate blog post or if I should do this combined list...
04:05 pm GMT - Tue, January 5, 2021
CSS Tricks 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 greens, fall is oranges). You&...
10:12 pm GMT - Mon, January 4, 2021
CSS Tricks Creating Arrays in Hasura
Hasura is one of my favorite ways to create a managed GraphQL API for my applications. I find it easy and straightforward as well as suitable for a wide range of use cases. However, since working with...
08:33 pm GMT - Mon, January 4, 2021
CSS Tricks The End of Adobe Flash
I come to bury Flash, not to praise it, writes Matt May in this excellent thread about the end of Adobe Flash. Not so long ago, web designers used Flash to create striking visuals and animations and g...
02:59 pm GMT - Mon, January 4, 2021
CSS Tricks Make Your Own Tools
Spencer Miskoviak on the Wealthfront blog:By creating custom DevTools specific to an app, they can operate at an even higher abstraction to handle things like user interactions, or debugging tracking ...
03:35 pm GMT - Fri, January 1, 2021
CSS Tricks Houdini.how
Nice site from Google (and guest contributors) with a bunch of fun demos of what Houdini can do. Plus a write-up from Una. These are all Paint API demos. Houdini is technically a group of seven things...
03:22 pm GMT - Fri, January 1, 2021
CSS Tricks 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 that vertical centering that has tra...
10:12 pm GMT - Thu, December 31, 2020
CSS Tricks Thank You (2020 Edition)
Heck of a year, eh? Like we do ever 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 at CSS-Tricks, it was more of a ̷...
07:27 pm GMT - Thu, December 31, 2020
CSS Tricks Give your Eleventy Site Superpowers with Environment Variables
Eleventy is increasing in popularity because it allows us to create nice, simple websites, but also because its so developer-friendly. We can build large-scale, complex projects with it, too. In this...
03:48 pm GMT - Thu, December 31, 2020
CSS Tricks A font-display setting for slow connections
Me, I really dislike FOUT. I like that it’s an option, because not displaying text quickly on the web is no good. I know font-display: swap; is popular because it’s good for performance, b...
03:48 pm GMT - Thu, December 31, 2020
CSS Tricks 3 Steps to Enable Client Hints on Your Image CDN
The goal of Client Hints is to provide a framework for a browser when informing the server about the context in which a web experience is provided.HTTP Client Hints are a proposed set of HTTP Header F...