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

Laravel 11.37, Recurr, Streaming Responses, and more! - №547

Sunday, January 12, 2025

Your Laravel week in review ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

NATO Alphabet Converter/Huge If True/Framework for letting "it" go

Sunday, January 12, 2025

Recomendo - issue #445 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Kotlin Weekly #441

Sunday, January 12, 2025

ISSUE #441 12th of January 2025 Announcements Become a KotlinConf 2025 volunteer! The KotlinConf has started a Call for Volunteers to help out at the conference in May! If you are interested, check out

Healthy life, Meta's AI and legibility

Saturday, January 11, 2025

Neologism #25, 11.01.2024 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Daily Coding Problem: Problem #1665 [Medium]

Saturday, January 11, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by LinkedIn. A wall consists of several rows of bricks of various integer lengths and

📊 Every Smartphone I've Ever Owned, Ranked — This Tiny Smart Remote Is the Most Exciting Thing at CES

Saturday, January 11, 2025

Also: 5 Android Notification Features to Make Your Day Easier, and More! How-To Geek Logo January 11, 2025 Did You Know On March 12, 1951, a curious thing happened. In the United States and the United

Ranked | The Top Grossing Movies Worldwide in 2024 🎬

Saturday, January 11, 2025

Established IP dominated the 2024 box office, with top films mostly being sequels, spin-offs, or franchise continuations. View Online | Subscribe | Download Our App FEATURED STORY Ranked: Top Grossing

📖 Your Step-by-Step Guide to Securing AI in the Enterprise

Saturday, January 11, 2025

January 11, 2025 | Read Online Subscribe | Advertise Good Morning. Welcome to this special edition of The Deep View, brought to you in collaboration with Tines. When it comes to adopting AI securely,

🐍 New Python tutorials on Real Python

Saturday, January 11, 2025

Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: Iterators and Iterables in Python: Run Efficient

Life Update: Me. In Shorts. In Antarctica [Pics Inside 🧊]

Saturday, January 11, 2025

And yes, I jumped in. It taught me a lot 😅 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏