Conditional Border Radius In CSS
Ahmad Shadeed documents a bonafide CSS trick from the Facebook CSS codebase. The idea is that when an element is the full width of the viewport, it doesn’t have any border-radius. But otherwise, it has 8px of border-radius. Here’s the code:
.card {
border-radius: max(0px, min(8px, calc((100vw - 4p..
Branching Strategies in Git
This article is part of our “Advanced Git” series. Be sure to follow us on Twitter or sign up for our newsletter to hear about the next articles!
Almost all version control systems (VCS) have some kind of support for branching. In a nutshell, branching means that you leave the main development line..
ct.css — Performance Hints via Injected Stylesheet Alone
This is some bonafide CSS trickery from Harry that gives you some generic performance advice based on what it sees in your element.
First, it’s possible to make a block visible like any other element by changing the display away from the default of none. It’s a nice little trick. Yo..
Quickly Testing CSS Fallbacks
Dumb trick alert!
Not all browsers support all features. Say you want to write a fallback for browsers that doesn’t support CSS Grid. Not very common these days, but it’s just to illustrate a point.
You could write the supporting CSS in an @supports blocks:
@supports (display: grid) {
.blocks {..
Animation Techniques for Adding and Removing Items From a Stack
Animating elements with CSS can either be quite easy or quite difficult depending on what you are trying to do. Changing the background color of a button when you hover over it? Easy. Animating the position and size of an element in a performant way that also affects the position of other elements? ..
ShopTalk Goes Video
Dave and I slapped up a little videos section of the ShopTalk website. Twelve so far! They are short-ish, between 10-20 minutes, each focused on one fairly specific thing. We’re kinda just dipping our toes here — we don’t even have a real proper name for them yet! The place to subscribe to them is Y..
Links on React and JavaScript II
How To Use The Vite Build Tool with React — Vite is hot, in part, because it’s based on esbuild and wickedly fast. It’s from Evan You of Vue fame, but it’s not a Vue-specific tool. Here, NARUHODO covers how to configure it to work with React.React Architecture: How to Structure and Organize a React ..
Using the platform
While I’m a front-end developer at heart, I’ve rarely had the luxury of focusing on it full time. I’ve been dipping in and out of JavaScript, never fully caught up, always trying to navigate the ecosystem all over again each time a project came up. And framework fatigue is real!
So, instead of final..
Working With Built-in GraphQL Directives
Directives are one of GraphQL’s best — and most unspoken — features.
Let’s explore working with GraphQL’s built-in schema and operation directives that all GraphQL spec compliant APIs must implement. They are extremely useful if you are working with a dynamic front-end because you have the control ..
Comparing HTML Preprocessor Features
(This is a sponsored post.)
Of the languages that browsers speak, I’d wager that the very first one that developers decided needed some additional processing was HTML. Every single CMS in the world (aside from intentionally headless-only CMSs) is essentially an elaborate HTML processor: they take c..