Your Web News in One Place

Articles by CSS Tricks from February 2021

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
< Return to CSS Tricks details.
05:00 pm GMT - Fri, February 26, 2021
CSS Tricks Weekly Platform News: Reduced Motion, CORS, WhiteHouse.gov, popups, and 100vw
In this week’s roundup, we highlight a proposal for a new <popup> element, check the use of prefers-reduced-motion on award-winning sites, learn how to opt into cross-origin isolation, s...
03:38 pm GMT - Fri, February 26, 2021
CSS Tricks The Things I Add to Tailwind CSS Right Out of the Box
In every project where I use Tailwind CSS, I end up adding something to it. Some of these things I add in every single project. Ill share these with you, but Im also curious what yall are adding to &#...
11:30 pm GMT - Thu, February 25, 2021
CSS Tricks An Interactive Guide to CSS Transitions
A wonderful post by Josh that both introduces CSS transitions and covers the nuances for using them effectively. I like the advice about transitioning the position of an element, leaving the original ...
11:30 pm GMT - Thu, February 25, 2021
CSS Tricks Ensuring the correct vertical position of large text
Tobi Reif notes how the position of custom fonts set at very large font sizes can be super different, even in the same browser across operating systems. The solution? Well, you know how there are cert...
03:43 pm GMT - Thu, February 25, 2021
CSS Tricks How We Improved the Accessibility of Our Single Page App Menu
I recently started working on a Progressive Web App (PWA) for a client with my team. Were using React with client-side routing via React Router, and one of the first elements that we made was the main...
03:42 pm GMT - Thu, February 25, 2021
CSS Tricks Boost app engagement with chat, voice, and video APIs
Sendbird is a service for helping you add social features to your app. Wanna add in-app chat? Sendbird does that. Wanna add in-app voice or video calls? Sendbird does that. Here’s how I always t...
10:32 pm GMT - Wed, February 24, 2021
CSS Tricks Teaching Web Dev for Free is Good Business
It feels like a trend (and a smart one) for tech platforms to invest in really high-quality learning material for their platform. Let’s have a gander.Webflow UniversitySurely Webflow is thinking...
04:21 pm GMT - Wed, February 24, 2021
CSS Tricks A DRY Approach to Color Themes in CSS
The other day, Florens Verschelde asked about defining dark mode styles for both a class and a media query, without repeat CSS custom properties declarations. I had run into this issue in the past but...
03:54 pm GMT - Wed, February 24, 2021
CSS Tricks SmolCSS
A wonderful collection of little layout-related CSS snippets from Stephanie Eckles that serves both as a quick reference and a reminder of how straightforward and powerful CSS has become. Random thing...
12:35 am GMT - Wed, February 24, 2021
CSS Tricks Hiding Content Responsibly
We’ve covered the idea of hiding things in CSS many times here, the most recent post being Marko Ilic’s “Comparing Various Ways to Hide Things in CSS” which did a nice job...
07:06 pm GMT - Tue, February 23, 2021
CSS Tricks React Component Tests for Humans
React component tests should be interesting, straightforward, and easy for a human to build and maintain.Yet, the current state of the testing library ecosystem is not sufficient to motivate developer...
05:08 pm GMT - Tue, February 23, 2021
CSS Tricks Whats the Backup Plan for Your WordPress Site?
Of all the reasons we love and use Jetpack for CSS-Tricksa poster child WordPress siteis that we can sleep easy at night knowing we have real-time backups running with Jetpack Backup. That way, no mat...
04:00 pm GMT - Mon, February 22, 2021
CSS Tricks Getting Deep into Shadows
Lets talk shadows in web design. Shadows add texture, perspective, and emphasize the dimensions of objects. In web design, using light and shadow can add physical realism and can be used to make rich,...
03:56 pm GMT - Mon, February 22, 2021
CSS Tricks To the brain, reading computer code is not the same as reading language
One of the things I do when teaching beginning front-end development is ask students to describe what it’s like to read HTML. I give them pretty basic markup for a long-form article, and ask the...
10:32 pm GMT - Fri, February 19, 2021
CSS Tricks Clipping Scrollable Areas On The inline-start Side
On a default left-to-right web page, “hanging” an element off the right side of the page (e.g. position: absolute; right: -100px;) triggers a horizontal scrollbar that scrolls as far as ne...
04:09 pm GMT - Fri, February 19, 2021
CSS Tricks Three Ways to Blob with CSS and SVG
Blobs are the smooth, random, jelly-like shapes that have a whimsical quality and are just plain fun. They can be used as illustration elements and background effects on the web.So, how are they made?...
04:05 pm GMT - Fri, February 19, 2021
CSS Tricks Use CSS Variables instead of React Context
Turns out you can use several different libraries to pass color information around components. Or, you could use custom properties, built right into CSS, have no decline in your own developer experien...
10:39 pm GMT - Thu, February 18, 2021
CSS Tricks Mistakes Ive Made as an Engineering Manager
Ive been a manager for many years at companies of different scale. Through these experiences, Ive done my share of learning, and made some mistakes along that way that were important lessons for me. I...
09:19 pm GMT - Thu, February 18, 2021
CSS Tricks Recipe websites, data modeling, and user experience
Simeon Griggs with some nice UX ideas for a recipe website:No math. Swap between units and adjust servings on-the-fly.Offer alternative ingredients.Re-list the ingredient amounts when they’re re...
04:27 pm GMT - Thu, February 18, 2021
CSS Tricks Lets Create a Custom Audio Player
HTML has a built-in native audio player interface that we get simply using the <audio> element. Point it to a sound file and thats all there is to it. We even get to specify multiple files for...
04:25 pm GMT - Thu, February 18, 2021
CSS Tricks Barebones CSS for Fluid Images
Zach takes a look at some fundamental HTML+CSS usage for fluid, responsive images. Most of it, I’d say, is what you’d expect, but things get weird when srcset gets involved. I poked my way...
09:50 pm GMT - Wed, February 17, 2021
CSS Tricks You want
I’ve been enjoying these little “You want…” style posts. Post titles like that are a little more… forceful for my normal taste, but I like the spirit of sharing a best pr...
09:20 pm GMT - Wed, February 17, 2021
CSS Tricks Things You Can Do With CSS Today
Some nice coverage from Andy about CSS things that are truly new. If you haven’t looked at new things in CSS in, say, a year, I’d bet pretty much all of this will be new to you. A lot of &...
04:05 pm GMT - Wed, February 17, 2021
CSS Tricks CSS Switch-Case Conditions
CSS is yet to have a switch rule or conditional if, aside from the specific nature of @media queries and some deep trickery with CSS custom properties. Lets have a look at why it would be useful if we...
03:54 pm GMT - Wed, February 17, 2021
CSS Tricks Use CSS Clamp to create a more flexible wrapper utility
I like Andy’s idea here: .wrapper { width: clamp(16rem, 90vw, 70rem); margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem;}Normally I’d just set a max-w...
11:44 pm GMT - Tue, February 16, 2021
CSS Tricks Front of the Front / Back of the Front
People really latched onto Brad’s framing. And for good reason. Front-end development has gotten so wide scoping that there are specialists inside of it. Two years ago, I cut it down the middle ...
09:17 pm GMT - Tue, February 16, 2021
CSS Tricks How to Create a Shrinking Header on Scroll Without JavaScript
Imagine a header of a website that is nice and thick, with plenty of padding on top and bottom of the content. As you scroll down, it shrinks up on itself, reducing some of that padding, making more s...
09:16 pm GMT - Tue, February 16, 2021
CSS Tricks Maximally optimizing image loading for the web in 2021
Malte Ubl’s list for:8 image loading optimization techniques to minimize both the bandwidth used for loading images on the web and the CPU usage for image display.Fluid width images in CSS, not ...
04:01 pm GMT - Tue, February 16, 2021
CSS Tricks The web didnt change; you did
I love this piece from Remy Sharp where he argues that the web didnt get more complicated over the last 20 years, despite what we might think:Web development did not change. Web development grew. Ther...
03:59 pm GMT - Tue, February 16, 2021
CSS Tricks Netlify
High five to Netlify for the sponsorship. Netlify is a great place to host your static (or not-so-static!) website because of the great speed, DX, pricing, and feature set. I’ve thought of Netl...
09:48 pm GMT - Mon, February 15, 2021
CSS Tricks Using AbortController as an Alternative for Removing Event Listeners
The idea of an abortable fetch came to life in 2017 when AbortController was released. That gives us a way to bail on an API request initiated by fetch() even multiple calls whenever we want.Heres a...
03:38 pm GMT - Mon, February 15, 2021
CSS Tricks Beautiful accessibility with Floating Focus
Imagine if your :focus styles animated from element to element as you tab through a site. Like the focus ring up and flew across the page to the next element. The spirit of it is similar to smooth scr...
06:21 pm GMT - Sat, February 13, 2021
CSS Tricks Front-End Dissatisfaction (and Backing Off)
Asko Nmm reached a breaking point with front end:I want to have a personal life and not have to spend my nights reading up on some new flavour of *.js in fear that if I don’t I would soon …...
09:53 pm GMT - Fri, February 12, 2021
CSS Tricks Weekly Platform News: WebKit autofill, Using Cursor Pointer, Delaying Autoplay Videos
In this week’s roundup, WebKit’s prefixed autofill becomes a standard, the pointer cursor is for more than just links, and browsers are jumping on board to delay videos set to autoplay unt...
08:03 pm GMT - Fri, February 12, 2021
CSS Tricks Dont put pointer-events: none on form labels
Bruce Lawson with the tip of the day, warning against the use of pointer-events: none on forms labels. We know that pointer-events is used to change how elements respond to click, tap, hover, and acti...
08:03 pm GMT - Fri, February 12, 2021
CSS Tricks Responsible Web Applications
Joy Heron bought a cool domain name and published an article there:Luckily, with modern HTML and CSS, we can create responsive and accessible web apps with relative ease. In my years of doing software...
03:56 pm GMT - Fri, February 12, 2021
CSS Tricks Reconciling Editor Experience and Developer Experience in the CMS
Components are great, arent they? They are these reusable sources of truth that you can use to build rock-solid front-ends without duplicating code.You know what else is super cool? Headless content m...
03:54 pm GMT - Fri, February 12, 2021
CSS Tricks The Devils Albatross
Nils Binder talks about a technique for spacing between two elements. Picture a header on a large screen with a logo in the upper left and nav in the upper right. Then a small screen, when they can no...
11:21 pm GMT - Thu, February 11, 2021
CSS Tricks Is CSS float deprecated?
An interesting conversation came up at work the other day: Should we use the CSS float property now that we have CSS Grid and Flexbox?The short answer No! Well, mostly. Id only use it today for wrappi...
11:21 pm GMT - Thu, February 11, 2021
CSS Tricks Progressive Web Apps in 2021
Maximiliano Firtman has a look at PWAs this year, including trying to get a bead on how widespread they are:At the end of 2020, approximately 1% of websites included a Service Worker, and 2.2% ha...
04:08 pm GMT - Thu, February 11, 2021
CSS Tricks WordPress 5.7: Big ol jQuery Update
WordPress core is making the jump from jQuery 1.12.4 to jQuery 3.5.1! This is a big deal for lots of reasons like modern features, better DX, and security improvements to name a few. Right now, the p...
04:08 pm GMT - Thu, February 11, 2021
CSS Tricks How to Build a GraphQL API for Text Analytics with Python, Flask and Fauna
GraphQL is a query language and server-side runtime environment for building APIs. It can also  be considered as the syntax that you write in order to describe the kind of data you want from APIs...
02:24 pm GMT - Thu, February 11, 2021
CSS Tricks iframe feedback
What if an <iframe had within it another <iframe of the exact same source? Inception, as they say. Baptise Crespy does this all-important research in the name of art and science.Turns out brow...
11:40 pm GMT - Wed, February 10, 2021
CSS Tricks HTML Video Sources Should Be Responsive
Scott Jehl doesn’t mince words here:Removing media support from HTML video was a mistake. It means that for every video we embed in HTML, were stuck with the choice of serving source f...
08:51 pm GMT - Wed, February 10, 2021
CSS Tricks :focus-visible Support Comes to Firefox
Look at that! The :focus-visible pseudo-selector is now supported in Firefox, as of version 85 which shipped yesterday. I had to rush over to the MDN Docs just to confirm, and yep, the :focus-visible ...
06:21 pm GMT - Wed, February 10, 2021
CSS Tricks How to Favicon in 2021
I always appreciate someone looking into and re-evaluating the best practices of something that literally every website needs and has a complex set of requirements. Andrey Sitnik has done that here wi...
03:46 pm GMT - Wed, February 10, 2021
CSS Tricks The Differences in Web Hosting (Go with the Happy Path)
One of our readers checked out “Helping a Beginner Understand Getting a WebsiteLive” and had some follow up questions specifically about hosting providers. Here’s what they asked:Wha...
01:06 am GMT - Wed, February 10, 2021
CSS Tricks A table with both a sticky header and a sticky first column
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 wh...
08:34 pm GMT - Tue, February 9, 2021
CSS Tricks Nested Media Queries
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 medi...
04:13 pm GMT - Tue, February 9, 2021
CSS Tricks Recreating Game Elements for the Web: The Among Us Card Swipe
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 a...
09:07 pm GMT - Mon, February 8, 2021
CSS Tricks SVG within CSS
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...
03:24 pm GMT - Mon, February 8, 2021
CSS Tricks Animating a CSS Gradient Border
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 som...
03:24 pm GMT - Mon, February 8, 2021
CSS Tricks (Jay Freestones) Front-end predictions for 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 deve...
10:51 pm GMT - Fri, February 5, 2021
CSS Tricks Exploring the Complexities of Width and Height in CSS
The following article is co-authored by Uri Shaked and Michal Porag.Lets explore the complexities of how CSS computes the width and height dimensions of elements. This is based on countless late-night...
09:02 pm GMT - Fri, February 5, 2021
CSS Tricks Weekly Platform News: The :not() pseudo-class, Video Media Queries, clip-path: path() Support
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 scrollin...
03:38 pm GMT - Fri, February 5, 2021
CSS Tricks Some React Blog Posts Ive Bookmarked and Read Lately
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 muddi...
08:36 pm GMT - Thu, February 4, 2021
CSS Tricks Some Typography Blog Posts Ive Bookmarked and Read Lately
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...
03:53 pm GMT - Thu, February 4, 2021
CSS Tricks Lazy Load Routes in Vue with webpack Dynamic Comments
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...
02:51 pm GMT - Thu, February 4, 2021
CSS Tricks Algolia
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 A...
09:28 pm GMT - Wed, February 3, 2021
CSS Tricks Some Performance Blog Posts Ive Bookmarked and Read Lately
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...
04:31 pm GMT - Wed, February 3, 2021
CSS Tricks Going From Solid to Knockout Text on Scroll
Heres 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 a...
01:17 am GMT - Wed, February 3, 2021
CSS Tricks The Web is for More Than Document Viewing
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, 2021I don’t know Ken, s...
09:56 pm GMT - Tue, February 2, 2021
CSS Tricks I Saw Two Mega Menus Today
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...
03:46 pm GMT - Tue, February 2, 2021
CSS Tricks Dynamically Switching From One HTML Element to Another in Vue
A friend once contacted me asking if I had a way to dynamically change one HTML element into another within Vues template block. For instance, shifting a <div> element to a <span> elem...
11:51 pm GMT - Mon, February 1, 2021
CSS Tricks Cancelable Smooth Scrolling
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 cat...
11:51 pm GMT - Mon, February 1, 2021
CSS Tricks Open Web Docs
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 organiz...
08:13 pm GMT - Mon, February 1, 2021
CSS Tricks Figma Crash Course
Totally free course from Pablo Stanley. Can’t beat that.Figma is just blowing up, and for good reason. It’s good software aligned with what digital designers need. It’s fast. It̵...
03:34 pm GMT - Mon, February 1, 2021
CSS Tricks 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 color between two color stops, and another...