Search
Stacked Cards with Sticky Positioning and a Dash of Sass
13.8.2020
The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll.
I started wondering how much JavaScript this would involve and how you’d go about making it when I realized — ah! — this must be the work...
Practical Use Cases for JavaScript’s closest() Method
12.8.2020
Have you ever had the problem of finding the parent of a DOM node in JavaScript, but aren’t sure how many levels you have to traverse up to get to it? Let’s look at this HTML for instance:
<div data-id="123"<buttonClick me</button</div
That’s pretty straightforward, right? Say...
PSF Token Invokes the First Coin-Age Staking Protocol on Bitcoin Cash
11.8.2020
During the last six months, the Simple Ledger Protocol has grown immensely and there’s been 9,604 SLP tokens created since the infrastructure launched. Just recently news.Bitcoin.com reported on mistcoin, the mineable SLP token that can be mined with a CPU. Now software developer Chris...
Nailing the Perfect Contrast Between Light Text and a Background Image
7.8.2020
Have you ever come across a site where light text is sitting on a light background image? If you have, you’ll know how difficult that is to read. A popular way to avoid that is to use a transparent overlay. But this leads to an important question: Just how transparent should that overlay...
JavaScript Fatigue
6.8.2020
From Nicholas Zakas’ newsletter, on how he avoids JavaScript fatigue:
 I don’t try to learn about every new thing that comes out. There’s a limited number of hours in the day and a limited amount of energy you can devote to any topic, so I choose not to learn about anything...
TypeScript, Minus TypeScript
6.8.2020
Unless you’ve been hiding under a rock the last several years (and let’s face it, hiding under a rock sometimes feels like the right thing to do), you’ve probably heard of and likely used TypeScript. TypeScript is a syntactical superset of JavaScript that adds — as its name suggests — typing to...
Match Accented Letters with Regular Expressions
6.8.2020
Regular expressions are used for a variety of tasks but the one I see most often is input validation. Names, dates, numbers…we tend to use regular expressions for everything, even when we probably shouldn’t. The most common syntax for checking alphabetic characters is A-z but what...
Expanding the Future (of Dev Tooling) with AI
5.8.2020
Codota wants their tools to (at least!) double developer productivity. My vision is that we can do that not only by getting more developers using these tools, but in expanding where and how these tools learn themselves. The better the tools can *learn from us* what we're doing, the better *we...
Promise.allSettled
3.8.2020
The Promise object has many useful functions like all, resolve, reject, and race — stuff we use all the time. One function that many don’t know about is Promise.allSettled, a function that fires when all promises in an array are settled, regardless of whether any of the promises...
A Lightweight Masonry Solution
31.7.2020
Back in May, I learned about Firefox adding masonry to CSS grid. Masonry layouts are something I’ve been wanting to do on my own from scratch for a very long time, but have never known where to start. So, naturally, I checked the demo and then I had a lightbulb moment when I understood...
Collective #615
23.7.2020
Primo * What the f*** is ...? * 3D Book Image CSS Generator * Event Delegation in JavaScript * CSS easing
The post Collective #615 appeared first on Codrops
Vue 3.0 has entered Release Candidate stage!
23.7.2020
Vue is in the process of a complete overhaul that rebuilds the popular JavaScript framework from the ground up. This has been going on the last couple of years and, at long last, the API and implementation of Vue 3 core are now stabilize. This is exciting for a number of reasons:
Vue 3 promises...
WordPress-Powered Landing Pages on a Totally Different Site via Cloudflare Workers
22.7.2020
What if you have some content on one site and want to display that content on another site? We can do this in the browser no problem. We can fetch it, and plunk it onto the page.
Ajax, right? Ugh. Now we’re in client-side rendered site territory, which isn’t great for performance...
What ya need there is a bit of templating
22.7.2020
I had a fella write in to me the other day. He had some HTML, CSS, and JavaScript, and it just wasn’t behaving like he thought it ought to. The HTML had some placeholders in it and the JavaScript had some data in it, and the assumption was that the data would fill the placeholders.
To those...
How to Make a Monthly Calendar With Real Data
21.7.2020
Have you ever seen a calendar on a webpage and thought, how the heck did they did that? For something like that, it might be natural to reach for a plugin, or even an embedded Google Calendar, but it’s actually a lot more straightforward to make one than you might think and only requires...
Binding Arguments with Bind
20.7.2020
One of my favorite and most essential Function method is bind, a function we added to MooTools when it wasn’t featured in the JavaScript language itself. We often think of using bind to simply bind a method’s call to its host object, but did you know you can also bind arguments with...
Creating a Gatsby Site with WordPress Data
20.7.2020
In my previous article last week, I mentioned creating a partially ported WordPress-Gatsby site. This article is a continuation with a step-by-step walkthrough under the hood.
Gatsby, a React-based framework for static sites, is attracting attention not only from JavaScript developers but also from...
Netlify Does Cache Invalidation For You
15.7.2020
This is one of my favorite Netlify features. Say you’re working on a site and you change as asset like a CSS, JavaScript, or image file. Ya know, like do our job. On Netlify, you don’t have to think about how that’s going to play out with deployment, browsers, and cache. Netlify...
Three CSS Alternatives to JavaScript Navigation
14.7.2020
Hey quick! You’ve gotta create the navigation for the site and you start working on the mobile behavior. What pattern do you choose? If you’re like most folks, it’s probably the “hamburger” menu that, when clicked, uses a little JavaScript to expand a vertical list of navigation links.
But that’s...
Lazy Load IFRAMEs
13.7.2020
We’ve known for a decade that lazy loading resources like JavaScript, CSS, and especially images is a massive performance win for web pages. At first we used tricks and JavaScript to do the lazy loading, but more recently native image lazy loading has debuted in browsers. Did you know that...