Web Tools #400 - CSS Tools, Testing, JS Utilities

Web Tools Weekly
WEB VERSION
Tools for Web Developers

Issue #400 • March 18, 2021

Advertisement
Set Up, Manage & Secure Apple Devices in Minutes
Jamf Now is a device management solution for your team's Apple devices at work. We make management tasks simple and affordable, so you can support your users; no IT required. Web Tools Weekly readers can manage 3 devices free now!
Create Your Free Account Today!
Jamf Now

I previously discussed the new Optional Chaining operator, represented by "?." that allows you to do deep object property references without having to look up every part of the object chain.

Another cool thing you can do with this operator is ensure that a method call exists. MDN points out why this might be useful:

"This can be helpful, for example, when using an API in which a method might be unavailable, either due to the age of the implementation or because of a feature which isn't available on the user's device."

Here's an example – take note of the operator used on the final line:

let myActions = {
  doThingOne: function () {
    console.log('Thing One Done');
  },

  doThingTwo: function () {
    console.log('Thing Two Done');
  }
};

myActions.doThingOne();
myActions.doThingTwo();
myActions.doThingThree?.();

Try it on CodePen

This is a common way to define methods on an object, similar to what's called the Module Pattern. Notice when I call each function, I have to use the object reference as the parent scope.

With the Optional Chaining operator, I don't have to check for the existence of any of the functions before calling them. In my case, I only used the operator when calling the non-existent doThingThree() function, but I could have used it on all of them, which would be the safest practice.

As when dealing with properties, this operator ensures there's no error thrown if the function doesn't exist or (in line with MDN's use case) if portions of the API being accessed are temporarily down for whatever reason.

A couple of final things to note:

  • If the function name exists but is actually a property and not a function, this will throw an error
  • If the root object is null or undefined, this will throw an error, but you can use the Optional Chaining operator on the object itself (e.g. myActions?.doThingThree?.()) if you suspect the root object may be down or non-existent


Now on to this week's tools!

CSS and HTML Tools

Set Up, Manage & Secure Apple Devices in Minutes
Jamf Now is a device management solution for your team's Apple devices at work. We make management tasks simple and affordable, so you can support your users; no IT required. Web Tools Weekly readers can manage 3 devices free now! sponsored 

Charts.css
A modern CSS framework that uses CSS utility classes to style HTML elements as charts (area, bar graphs, line charts, 3D charts, animated charts, etc).

Tailwind Shades
A CSS color shades generator for Tailwind projects. Just enter a color and this tool will spit out a group of related shades to drop into a Tailwind project.

css-shorthand-expanders
Type-safe functions to expand CSS shorthands into their longhand sub-properties, to support atomic CSS-in-JS libraries, which can't handle shorthand.

HTML Boilerplates
Online tool to start a web project by generating and downloading a custom HTML boilerplate. Just flip the switches you want and the code is added for those items automatically.

HTML Boilerplates

Beamwind
A collection of packages to compile Tailwind CSS like shorthand syntax into CSS at runtime.

Gradient Generator
Customize and generate CSS for linear, radial, and conic gradients. Includes "easing" and "precision" options and the ability to download as SVG.

plchldr.co
API to generate colorful placeholders for web projects. Enter width, height, background color, text color, and custom text, then grab the HTML.

ress
A modern CSS reset based on Normalize.css, but with some customizations.

Microlink Cards
An easy way to create and share dynamic images at scale, useful for social cards or similar.

Windi CSS
A next generation compiler as an alternative to Tailwind, providing faster load times, and supports all the features in Tailwind v2.0.

a11y-color-tokens
npm package to generate accessible complementary text or UI colors as Sass variables and/or CSS custom properties from your base color tokens.

HTML-validate
Offline HTML5 validator. that validates either a full document or a smaller  template (e.g. from an Angular or Vue component).

Testing and Debugging Tools

Tech Productivity Newsletter
A brief weekly newsletter sent out every Monday that features productivity tools and articles on efficiency, well-being, remote work, and more.   promoted

Ponicode
Unit test in just a few clicks. Create, modify and visualize your unit tests in seconds and boost your code coverage with AI-based test generation.

QA Wolf
Helps you create, run, and maintain end-to-end browser tests 10x faster. No library installation or configuration needed.

QA Wolf

fast-check
Property based testing for JavaScript and TypeScript. Checks characteristics of the output given the whole range of possible inputs, rather than relying on hard-coded inputs and outputs.

WebdriverIO
Next-generation browser and mobile automation test framework for Node.js.

React Dev Inspector
Package that allows you to jump to local IDE code directly from a React component with a click, similar to Chrome's inspector, but more advanced.

page-with
A library for usage example-driven in-browser testing of your own libraries.

SonarCloud
A code quality analysis tool that finds bugs and vulnerabilities, free for public repos (GitHub, Bitbucket, GitLab, etc).

1log
A replacement for console.log() that adds ability to return an argument/proxy and plugin support.

AWS Pricing Calculator
Estimate the cost for your architecture solution. Configure a cost estimate that fits your unique business or personal needs with AWS products and services.

Inspect
Free for 30 days. A new developer tool for macOS and Windows to inspect and debug your web apps and websites on iOS devices.

pentf
Parallel end-to-end test framework, runs tests (with or without web browsers, emails, and/or direct HTTP requests) in a parallel manner, so that tests bound by client CPU can run while other tests are waiting.

JavaScript Utilities and Modules

Color Picker
A simple color picker with support for touch events, written in pure JavaScript, for modern browsers.

gifenc
A fast and lightweight pure-JavaScript GIF encoder for the browser and Node, with support for GIF animation and transparency.

Monio
An async-capable IO monad (a way to structure code in functional programming) for JavaScript, with several companion monads thrown in.

ackbar-snackbar
A small, very easy to use and highly customizable "snackbar" component (kind of like a "toast" message) to use on any project.

typecheck.macro
Automatically generate blazing fast validators for Typescript types. Helps because Typescript types are erased at compile time and you can't use them to validate data at runtime.

p-limit
Run multiple promise-returning and async functions with limited concurrency.

Gaze-detection
Use machine learning in JavaScript to detect eye movements and build gaze-controlled experiences. FWIW, I couldn't get the demo to work on my machine.

element-resize-detector
Optimized cross-browser resize listener for elements.

disableautofill.js
Script to disable form auto-fill and auto-complete functions in Chrome. I assume this would not be for production but for some other use cases that don't interfere with privacy/security.

OrgChart
Plugin to build a custom tree-based organization chart that you can drop into an about page or similar documentation. The demos are nice.
 
OrgChart

ExcellentExport.js
Older project with recent updates that lets you add an "export to Excel" button to an HTML data table.

On the Release Radar:

A Tweet for Thought

This video summary of pretty much everyone's experience using an all-in-one printer made my laugh out loud.

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...

If you like quick coding tips, check out Front-end Tips, the newest project from Phuoc Nguyen. Currently 100 tips and growing.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly

Support this newsletter:
PayPal.me  Patreon / GitHub Sponsors  E-Books

Older messages

Web Tools #399 - JS Libraries, SVG Tools, Git/CLI

Saturday, March 13, 2021

Web Tools Weekly WEB VERSION Issue #394 • February 4, 2021 The following intro is a paid product review for Cloudways, a managed cloud hosting platform for digital agencies, developers, and e-commerce

Web Tools #398 - Frameworks, Mobile Tools, GraphQL/DB

Thursday, March 4, 2021

Web Tools Weekly WEB VERSION Issue #398 • March 4, 2021 Advertisement Fix Vulnerabilities in Your App with a Pull Request Is your app affected by the 2028 new open source vulnerabilities discovered

Web Tools #397 - CSS Tools, VS Code, Uncats

Thursday, February 25, 2021

Web Tools Weekly WEB VERSION Issue #397 • February 25, 2021 Advertisement Let's Hear It For The Builders Expert builders and architects like you depend on the best tools. Nova is the smartest, most

Web Tools #396 - Frameworks, JS Utils, React

Thursday, February 18, 2021

Web Tools Weekly WEB VERSION Issue #396 • February 18, 2021 In case you missed it, Wes Bos recently launched an update to his super-famous course Fullstack Advanced React & GraphQL. If you've

Web Tools #395 - Frameworks, Tailwind, React, SVG, Icons

Saturday, February 13, 2021

Web Tools Weekly WEB VERSION Issue #395 • February 11, 2021 Advertisement Wynter Research Panels Want to give back to the community while having a low-key side hustle ($90-$180/hr) to fund your habit?

You Might Also Like

Daily Coding Problem: Problem #1617 [Easy]

Saturday, November 23, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Microsoft. You are given an string representing the initial conditions of some dominoes.

Ranked | The Tallest and Shortest Countries, by Average Height 📏

Saturday, November 23, 2024

These two maps compare the world's tallest countries, and the world's shortest countries, by average height. View Online | Subscribe | Download Our App TIME IS RUNNING OUT There's just 3

⚙️ Your own Personal AI Agent, for Everything

Saturday, November 23, 2024

November 23, 2024 | Read Online Subscribe | Advertise Good Morning. Welcome to this special edition of The Deep View, brought to you in collaboration with Convergence. Imagine if you had a digital

Educational Byte: Are Privacy Coins Like Monero and Zcash Legal?

Saturday, November 23, 2024

Top Tech Content sent at Noon! How the world collects web data Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, November 23, 2024? The HackerNoon

🐍 New Python tutorials on Real Python

Saturday, November 23, 2024

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: Black Friday Giveaway @ Real Python This Black

Re: Hackers may have stolen everyone's SSN!

Saturday, November 23, 2024

I wanted to make sure you saw Incogni's Black Friday deal, which is exclusively available for iPhone Life readers. Use coupon code IPHONELIFE to save 58%. Here's why we recommend Incogni for

North Korean Hackers Steal $10M with AI-Driven Scams and Malware on LinkedIn

Saturday, November 23, 2024

THN Daily Updates Newsletter cover Generative AI For Dummies ($18.00 Value) FREE for a Limited Time Generate a personal assistant with generative AI Download Now Sponsored LATEST NEWS Nov 23, 2024

📧 Building Async APIs in ASP.NET Core - The Right Way

Saturday, November 23, 2024

​ Building Async APIs in ASP .NET Core - The Right Way Read on: m​y website / Read time: 5 minutes The .NET Weekly is brought to you by: Even the smartest AI in the world won't save you from a

WebAIM November 2024 Newsletter

Friday, November 22, 2024

WebAIM November 2024 Newsletter Read this newsletter online at https://webaim.org/newsletter/2024/november Features Using Severity Ratings to Prioritize Web Accessibility Remediation When it comes to

➡️ Why Your Phone Doesn't Want You to Sideload Apps — Setting the Default Gateway in Linux

Friday, November 22, 2024

Also: Hey Apple, It's Time to Upgrade the Macs Storage, and More! How-To Geek Logo November 22, 2024 Did You Know Fantasy author JRR Tolkien is credited with inventing the main concept of orcs and