Web Tools #419 - Icons/SVG, Build Tools, JS Utilities

Web Tools Weekly
WEB VERSION
Tools for Web Developers

Issue #419 • July 29, 2021

Advertisement
Store. Optimize. Deliver Images with ImageKit.io
What's the best image format for a website? What about the size? How do I optimize WebP/AVIF? What about cross-device optimization? If you are constantly riddled by these questions when you think of images, you should check out ImageKit.io.
Try ImageKit's Forever Free Plan Today
ImageKit.io

Here's a DOM method that I've yet to cover in a tip before: Element.closest(). You may have heard of this one because it's been part of the HTML5 standard for a while but likely didn't have developer interest due to lack of support in pre-Chromium versions of Edge. It's now supported across the board in modern browsers.

This method lets you traverse the DOM starting from the targeted element, searching for the first element that matches a provided list of selectors. Here are a few examples:

let myEl = document.querySelector('.inside');

myEl.closest('.previous, .next').innerText;
myEl.closest('.inside').className;
myEl.closest('.next').innerHTML;

Notice after I grab my desired element, I use the method by passing in a string of one or more valid selectors, separated by commas.

Try it in this CodePen demo

The demo targets an element that's nested deeply inside a few other elements, so I can traverse up until I find what I want. I'm using console logs to show the data I'm grabbing, so make sure to view the console in CodePen or in your browser.

The closest() method returns the first element that matches the specified selector. If more than one selector is used (like my first example above), the element returned is the first one that's matched.

In my two-selector example, if there's no element with a class name of "previous", it will search for one with a class of "next". If neither is found, it returns null.

The method is quite flexible because you can pass in any valid selector string including new pseudo-classes like :not, :disabled, :empty, and so forth. So it's kind of like parentNode or parentElement on steroids. An interesting and useful DOM method to keep in mind for advanced DOM manipulation in your projects.

Now on to this week's tools!
 

 

Media Tools (SVG, Audio, Video, etc.)

Store. Optimize. Deliver Images with ImageKit.io
What's the best image format for a website? What about the size? How do I optimize WebP/AVIF? What about cross-device optimization? If you are constantly riddled by these questions when you think of images, you should check out ImageKit.io.   sponsored 

Ant Design Charts
A charting library powered by React and G2Plot that lets you create elegant and and easy to use diagrams, graphs, area charts, and more.

Glitter Text
A really neat glitter text generator. Type your text then use the "save" link to grab the SVG that produces the glitter text.

Same Energy
An image search engine that lets you paste your own image or do a keyword search to search for similar images to the one selected.

Elementary Audio
A JavaScript runtime for writing native audio applications, as well as a library and framework for composing audio signal processes.

Elementary Audio

3Dengine
A JavaScript WebGL 3D engine built from scratch. The live version works quite nicely in the browser.

iMac Vector Illustrations
A set of 7 free, do what you want, iMac 24” vector illustrations for creating iMac-based mockups.

AVPress
An in-browser video compressor that includes a number of different settings to optimize and reduce the size of a video or GIF.

3D Bay
Royalty-free, high-quality 3D stock images. Search by keyword or select a category to choose from thousands of images.

Sequencer64
An experimental music creation tool that runs in the browser and works offline and lets you sequence a 64-step pattern for a 9-sound sampler.

Akar Icons
A set of 300+ "rounded" icons that you can download for use as a React snippet or SVG.

JPEG XL
A community website for JPEG XL, the next-generation, general-purpose image compression codec by the JPEG committee.

React SVG Radar Chart
A lightweight project to create "radar" charts.

Build Tools, Bundlers, etc.

Night Eye – The Best Dark Mode Extension
Night Eye is a browser extension that protects your eyes by enabling dark mode on any website. Unlike other extensions, Night Eye uses a smart conversion algorithm (no color inversion), has no ads, and has great support. Get a 25% discount on the lifetime offering by using discount code wtw at checkout.   sponsored 

React Native Liftoff
A CLI for quickly starting up a React Native project.

xo
An opinionated but configurable ESLint wrapper that enforces strict and readable code.

commitlint
A linter to help your team adhere to conventions for commit messages, based on npm-installed configurations.

new-tailwind-app
A zero-configuration cross-platform Node-based CLI that generates boilerplate code for Tailwind web apps based on React, Next.js, Gatsby, Vue, and Laravel.

Velociraptor
A multi-featured script runner that brings package.json-style scripts to Deno.

Astro
In early Beta. A build tool from the makers of Snowpack that promises to ship less JavaScript and works with your framework of choice.
 
Astro

Openbase
An npm package search engine that lets you compare millions of open-source packages with reviews, insights, and categories.

Packup
A web app bundler for Deno, inspired by Parcel.

Ness
Deploy websites to your AWS account with no sign-ups, paywalls, or scaling limitations.

Tasuku
An unopinionated, Type-safe, minimal task runner for Node.js.

fastify-vite
A Fastify plugin to serve Vite SSR apps with a universal API, data fetching, and hydration utilities.

esbuild-loader
Lets you harness the speed of esbuild in your webpack build by offering faster alternatives for transpilation (e.g. babel-loader/ts-loader) and minification (e.g. Terser).
 

JavaScript Utilities

Night Eye – The Best Dark Mode Extension
Night Eye is a browser extension that protects your eyes by enabling dark mode on any website. Unlike other extensions, Night Eye uses a smart conversion algorithm (no color inversion), has no ads, and has great support. Get a 25% discount on the lifetime offering by using discount code wtw at checkout.   sponsored 

use-color
A powerful color hook to parse and stringify colors with strict type checking at compile time.

Stoxy
A small, dependency-free, zero-config reactive state management system equipped with web components.

spacers
A JS library that supports multiple spacers for controlling padding, margins, and more.

TextKit
A framework for creating textual graphics. It provides layers, styling, rich color, text justification, layouts, tables, viewports, transparency, etc.

quetie
A small queue/dequeue implementation.

Milkdown
A plugin-driven WYSIWYG markdown Editor, inspired by Typora, built on top of ProseMirror and remark.
 
Milkdown

botd
A library for JavaScript bot detection (detecting automation tools, browser spoofing, and virtual machines).

Handsfree.js
Library to quickly integrate face, hand, and pose tracking to your front-end projects.

typesafe-i18n
An opinionated, fully type-safe, lightweight localization library for TypeScript and JavaScript projects with no external dependencies.

On the Release Radar:  

Want the latest in productivity tools and articles? Try my other newsletter, Tech Productivity. Includes tools, articles, and tips on productivity and remote work.

A Tweet for Thought

Here's a Steve Jobs email to Bill Gates from 1998 (click to view the full email in the Tweet).

A Tweet for Thought
 

Send Me Your Tools!

Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

This is different: DarkPattern.games is website to help you find healthy, non-addictive mobile games that don't use gaming dark patterns.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly

Want to get notified of new issues via Twitter, Telegram, or Messenger? You can sign up using a service called Reachme.

Support this newsletter:
PayPal.me  Patreon / GitHub Sponsors  E-Books / Buy Me a Coffee

Older messages

Web Tools #415 - JS Libraries, JSON/DB, React Tools

Friday, July 23, 2021

Web Tools Weekly WEB VERSION Issue #415 • July 1, 2021 Advertisement TLDR Newsletter - Byte Sized News for Busy Techies TLDR is a free daily newsletter with links and TLDRs of the most interesting

Web Tools #418 - VS Code, Front-end Frameworks, Uncats

Thursday, July 22, 2021

Web Tools Weekly WEB VERSION Issue #418 • July 22, 2021 Advertisement IP Geolocation API Identify a visitor's location based on their IP address with ipapi.com. This reverse IP lookup supports IPv4

Web Tools #417 - Testing Tools, React, GitHub/CLI Tools

Friday, July 16, 2021

Web Tools Weekly WEB VERSION Issue #417 • July 15, 2021 Advertisement Ship Embedded SaaS Integrations in Minutes with a Native iPaaS Building native integrations between your app and your customers

Web Tools #416 - ImageKit.io, CSS Tools, React, Jamstack

Saturday, July 10, 2021

Web Tools Weekly WEB VERSION Issue #416 • July 8, 2021 The following intro is a paid product review for ImageKit.io, a global image CDN with built-in optimization, real-time transformations, and more.

Web Tools #414 - Frameworks, JS Utils, Uncats

Thursday, June 24, 2021

Web Tools Weekly WEB VERSION Issue #414 • June 24, 2021 Advertisement IntersectionObserver Examples Practical, real world React examples of Intersection Observer. • No external JavaScript or CSS

You Might Also Like

DeveloPassion's Newsletter #164 - A Thousand Fans

Sunday, April 28, 2024

Edition 164 of my newsletter, discussing Knowledge Management, Knowledge Work, Zen Productivity, Personal Organization, and more! Sébastien Dubois DeveloPassion's Newsletter DeveloPassion's

Nobody Likes a Know-It-All: Smaller LLMs are Gaining Momentum

Sunday, April 28, 2024

Phi-3 and OpenELM, two major small model releases this week. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Retro Recomendo: Music

Sunday, April 28, 2024

Recomendo - issue #408 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Your Phone’s Other Number 📱

Saturday, April 27, 2024

Let's talk about your phone's IMEI number. Here's a version for your browser. Hunting for the end of the long tail • April 27, 2024 Today in Tedium: As you may know, Tedium is a blog and/or

🕹️ How to Play Retro Games for Free on iPhone — Why I Can't Live Without an eReader

Saturday, April 27, 2024

Also: Anker MagGo (Qi2) Power Bank Review, and More! How-To Geek Logo April 27, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your inbox by

Weekend Reading — The Bob Ross of programming

Saturday, April 27, 2024

This week we use coffee tasting as our design practice, get as close to and as far away from the metal as possible, find an easier way to write documentation, discover why Google Search is getting so

Issue #538: All the Jam entries, Panthera 2, and Tristram

Saturday, April 27, 2024

Weekly newsletter about HTML5 Game Development. Is this email not displaying correctly? View it in your browser. Issue #538 - April 26th 2024 If you have anything you want to share with the HTML5 game

Daily Coding Problem: Problem #1424 [Easy]

Saturday, April 27, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. Implement a URL shortener with the following methods: shorten(url) , which

Charted | Countries That Became More Happy (or Unhappy) Since 2010 😅

Saturday, April 27, 2024

Which countries had the highest happiness gains since 2010? Which became sadder? View Online | Subscribe Presented by Voronoi: The App Where Data Tells the Story FEATURED STORY Countries With the

Noonification: What Is E-Waste Hacking?

Saturday, April 27, 2024

Top Tech Content sent at Noon! The first AI-powered startup unlocking the “billionaire economy” for your benefit How are you, @newsletterest1? 🪐 What's happening in tech this week: The