Web Tools #470 - JS Classes, Tailwind, CSS, SVG, Bundlers

Web Tools Weekly
WEB VERSION
Tools for Web Developers

Issue #470 • July 21, 2022

Advertisement
Meet Filestack: The All-In-One File Handling Service
Filestack is the premier service designed to meet all your file handling needs, from improving upload speeds by a factor of 3.6 to providing swift and secure delivery. Give your app an instant upgrade today and download for free.

Download Now
Filestack

For this week's intro, let's take a look at JavaScript classes, a feature that was added way back in ES6 and with some incremental improvements since then. The concept of classes has been mimicked in JavaScript long before ES6 but the native class feature makes it easier to write class-based syntax that's common in many programming languages.

Class syntax in JavaScript looks like this:

class Animal {
  constructor(name) {
    this.name = name;
  }

  printName() {
    console.log("This animal is a " + this.name);
  }
}

const myAnimal = new Animal("Quokka");

// Output: "This animal is a Quokka"
myAnimal.printName();

The different parts of the syntax are as follows:

  • The class keyword indicates that the function I'm defining is a native JavaScript class. The example above is a class declaration (like a function declaration) as opposed to a class expression.
  • The constructor() method inside the class body is a special method of every class that creates and initializes an object instance of that class. The constructor() method can only appear once in the class body.
  • Instance properties are defined inside the constructor() method via the this keyword. In the code above, this.name is an instance property of the class.
  • A class cannot be called like a function (e.g. Animal()). It can only be invoked using the new keyword.
  • All methods defined inside the constructor (e.g. the printName() method above) are added to the class's prototype. When the printName() method is called on the Animal instance (which I've called myAnimal()), it accesses that method on the class's prototype. All future instances of this class would access the same method.
The code above is a really simple example using a JavaScript class with just the basics. If you're new to classes, you can use this CodePen demo to fiddle around with the code. Try adding new methods, creating new instances of the class, or changing and accessing the instance properties.

And if you're wondering about comparing native JavaScript classes with the old method of mimicking classes in ES5, you might want to read this Stack Overflow thread that explains why classes aren't just syntactic sugar. I've also implemented the same code from above using ES5-style pseudo-classes, which you can fiddle around with in this CodePen.
 

Now on to this week's tools!
 

CSS and HTML Tools

Meet Filestack: The All-In-One File Handling Service
Filestack is the premier service designed to meet all your file handling needs, from improving upload speeds by a factor of 3.6 to providing swift and secure delivery. Give your app an instant upgrade today and download for free.    SPONSORED 

css-browser-support
JavaScript API to query for CSS browser support data, combined from caniuse and MDN, including version support started and global support percentages.

CSS3 Maker
A one-stop set of online tools to generate CSS for gradients, shadows, transforms, filters, @font-face, transitions, animations, and more.

Tailwind Cheat Sheet Extension
Chrome extension that adds a Tailwind CSS cheat sheet for easy access to view, search for, and copy/paste all of Tailwind's classes, with optional dark mode.

Paper Prototype CSS
A CSS framework designed to make components on a page appear like a paper prototype.

Min-Max-Value Interpolation
Online tool for when you don’t need a whole fluid-scale token system but a single interpolation between two values in a viewport range.

Tailwind DX
A Chrome DevTools extension that adds smart tools for working with projects using Tailwind CSS, so you can edit Tailwind classes on the fly just like regular CSS in DevTools.

Tailwind DX

little-planet
A custom HTML Element (i.e. Web Component) that renders an interactive view of a panoramic photo.

Typed.css
A fully functional and flexible SCSS mixin that renders an animated CSS text typing effect with no JavaScript.

LCH Colour Picker
An online demo showing how LCH color in CSS works. Slide the sliders to see the syntax comparison between LCH and sRGB.

CSS Bed
An older project that showcases 'classless' CSS frameworks, each of which you can test right on the page. Would be nice to see this updated with some recent additions to this space.

 

Build Tools, Bundlers, etc.

Alternative Assets
What is an NFT? Alternative Assets demystifies and explains the hottest unique investment ideas out there. Collectibles, NFTs, Wine, Websites, even LEGOs. They don't just track the markets, they smash the markets.    SPONSORED 

Histoire
A new way to write stories. Fast and beautiful interactive component playgrounds, powered by Vite, with a customizable interface.

CodeGuard
A code obfuscator service with support for JavaScript and Python. Enter a raw Gist or GitHub repo link to obfuscate.

lockfile linting
Lint an npm or Yarn lockfile to analyze and detect security issues via predefined security policies.

bundlejs
Online tool to quickly check the size of an npm package bundle. Type the name of one or more packages to add to the 'bundle', then 'build' to view the size.

bundlejs

Bun
A fast all-in-one JavaScript runtime to bundle, transpile, install and run JavaScript and TypeScript projects. Includes a native bundler, transpiler, task runner, and npm client built-in.

moon
A repository management, organization, orchestration, and notification tool for JavaScript-based projects, written in Rust.

vite-vercel
Add middleware powered by Vercel Edge Functions to your existing Vite project.

ProtoScript
A runtime and code generation tool for JavaScript and TypeScript based on Google's protocol buffers (a method for serializing structured data).

pkg.land
An online search engine to find alternatives to npm packages. Just enter the name of a package and the tool will display recommendations.

qnm
A simple CLI utility for querying the node_modules directory to be able to track down bugs and conflicts faster.

react-native-esbuild
A fast and configurable bundler and development server for React Native, using esbuild.

Webpack App Starter
An opinionated but simple starter for building front-end projects with webpack.

 
💡 This week in VSCode.Email:
  • More customization for the cursor in VS Code
  • A VS Code theme for night workers
  • Boost your dev productivity with VS Code Snippets
Check the archives for the latest issue, and subscribe for more!
 

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

Alternative Assets
What is an NFT? Alternative Assets demystifies and explains the hottest unique investment ideas out there. Collectibles, NFTs, Wine, Websites, even LEGOs. They don't just track the markets, they smash the markets.    SPONSORED 

SVG Spinners
A collection of 40+ animated loading spinners in SVG format that includes many customary loading animations along with some other unique ones.

Super Designer
A collection of free design tools to create unique backgrounds, patterns, shapes, images, and more with just a few clicks.

Open Graph Image as a Service
Serverless service that generates dynamic Open Graph social images that you can embed in your HTML meta tags.

Pixelarticons
470+ open-source pixel-art style icons, in one color and made with a 24x24px grid.

Pixelarticons

Heazy
A platform to build vector (SVG) assets. Includes customizable templates, React/JS snippets for the assets, and the ability to save assets to your account for later use.

math.gl
A collection of math modules for Geospatial and 3D/WebGL visualization use cases.


Shaka Player
An open-source JavaScript library for adaptive media. It plays adaptive media formats (such as DASH and HLS) in a browser, without using plugins or Flash.

SND
A free set of UI sound assets designed to fit components used in many modern user interfaces. Click around the page to try out the sounds.

reagraph
A high-performance network graph visualization library built in WebGL for React.

Untitled UI Icons
A set of 1,100+ line-based Figma icons that have a clean, consistent, and neutral look. Premium version adds an additional 3,000+ icons.

PeerLite
A lightweight WebRTC browser library that supports video, audio, and data channels.
 

Commercial Apps and Classifieds

These are commercial apps (i.e. not free or limited free plan), paid classifieds, and affiliate links.

Ingradients – A collection of hand-picked mesh gradients (fig, svg, png, jpg).

upload – File and image CDN for developers with scalable cloud storage.

Emerging Tech Brew – A 5-minute read, your guide to the future of tech.  AD 

Serverless SaaS – A Next.js/Tailwind starter kit for building SaaS projects.

Malthus – Generate high-quality prospects and leads for your business.   AD 

Koyeb – A developer-friendly serverless platform to deploy apps globally.

FontVisual – A web-based font preview tool made for designers.
 

A Tweet for Thought

After Microsoft announced that June 15, 2022 would mark end-of-life status for Internet Explorer, someone in Korea built a real tombstone for the browser with an all-too-familiar epitaph.

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

I don't particularly think this idea is actually practical, but I like the ingenuity of Forebruary, a wall calendar that has a moveable frame so you never have to replace it like you would a paper calendar.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
@WebToolsWeekly
PayPal.me/WebToolsWeekly

Older messages

Web Tools #469 - React, Testing, Figma to Code, Uncats

Thursday, July 14, 2022

Web Tools Weekly WEB VERSION Issue #469 • July 14, 2022 Advertisement Meet Filestack: The All-In-One File Handling Service Filestack is the premier service designed to meet all your file handling needs

Web Tools #468 - Frameworks, JSON, Databases, JS Utilities

Thursday, July 7, 2022

Web Tools Weekly WEB VERSION Issue #468 • July 7, 2022 Advertisement Build Internal Tools 10x Faster with Retool Retool is the fast way for developers to build and share internal tools. Teams at

Web Tools #467 - CSS Tools, Git/CLI, React

Thursday, June 30, 2022

Web Tools Weekly WEB VERSION Issue #467 • June 30, 2022 Advertisement Meet Filestack: The All-In-One File Handling Service Filestack is the premier service designed to meet all your file handling needs

Web Tools #466 - WebPageTest, JS Libraries, Media Tools, Uncats

Thursday, June 23, 2022

Web Tools Weekly WEB VERSION Issue #466 • June 23, 2022 The following intro is a paid product review for WebPageTest, a suite of performance products and resources for developers and teams. If you'

Web Tools #465 - VS Code, Frameworks, Build Tools, React Native

Friday, June 17, 2022

Web Tools Weekly WEB VERSION Issue #465 • June 16, 2022 Advertisement Build Internal Tools 10x Faster with Retool Retool is the fast way for developers to build and share internal tools. Teams at

You Might Also Like

📧 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

JSK Daily for Nov 22, 2024

Friday, November 22, 2024

JSK Daily for Nov 22, 2024 View this email in your browser A community curated daily e-mail of JavaScript news React E-Commerce App for Digital Products: Part 4 (Creating the Home Page) This component

Spyglass Dispatch: The Fate of Chrome • Amazon Tops Up Anthropic • Pros Quit Xitter • Brave Powers AI Search • Apple's Lazy AI River • RIP Enrique Allen

Friday, November 22, 2024

The Fate of Chrome • Amazon Tops Up Anthropic • Pros Quit Xitter • Brave Powers AI Search • Apple's Lazy AI River • RIP Enrique Allen The Spyglass Dispatch is a free newsletter sent out daily on

Charted | How the Global Distribution of Wealth Has Changed (2000-2023) 💰

Friday, November 22, 2024

This graphic illustrates the shifts in global wealth distribution between 2000 and 2023. View Online | Subscribe | Download Our App Presented by: MSCI >> Get the Free Investor Guide Now FEATURED

Daily Coding Problem: Problem #1616 [Easy]

Friday, November 22, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Alibaba. Given an even number (greater than 2), return two prime numbers whose sum will

The problem to solve

Friday, November 22, 2024

​ Use problem framing to define the problem to solve This week, Tom Parson and Krishna Raha share tools and frameworks to identify and address challenges effectively, while Voltage Control highlights

Issue #568: Random mazes, train clock, and ReKill

Friday, November 22, 2024

View this email in your browser Issue #568 - November 22nd 2024 Weekly newsletter about Web Game Development. If you have anything you want to share with our community please let me know by replying to

Whats Next for AI: Interpreting Anthropic CEOs Vision

Friday, November 22, 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 22, 2024? The HackerNoon