Daily Shaarli

All links of one day in a single page.

September 28, 2022

Gunnar Morling 🌍 on Twitter: ""Good code documents itself" is one of the most damaging takes in software engineering. Code itself won't tell you about the decisions and rationale behind it, nor about about higher-level structures and abstractions. All this needs elaboration in documentation." / Twitter

Code itself won't tell you about the decisions and rationale behind it, nor about about higher-level structures and abstractions. All this needs elaboration in documentation.

GIFs Without the .gif: The Most Performant Image and Video Options Right Now | CSS-Tricks - CSS-Tricks

Use: <video autoplay loop muted playsinline src="cats.mp4"></video> as Twitter does

About #mp4, #webm, #x264, #x265, #VP9, #VP8, #AV1 containers and codecs

Evilmartian uses the new codec and here is the comparison: "In AV1 it is just 68 KB, similar to the image file. HEVC is 195 KB, and H264 is 512 КB."

Use an image for dark mode only 😯

<picture>
  <source srcset="dark-animation.avifs" media="(prefers-color-scheme: dark)">
  <img src="light-animation.avif" alt="">
</picture>
The 2022 Web Almanac

Stats are there for the year 2022, and updated yearly. A mine of resources.

Migration de WordPress vers Pelican - Jean-Christophe Gay

And I am migrating from Pelican to Astro x)

formkit/auto-animate: A zero-config, drop-in animation utility that adds smooth transitions to your web app. You can use it with React, Vue, or any other JavaScript application.

Usable in:
#react #svelte ....

Nano ID at Evil Martians

Nano ID is nano-sized unique string ID generator for JavaScript. It’s truly small (130 bytes minified), URL-friendly, and it has no dependencies. Plus, it’s safe, secure, and fast.

Project link: https://github.com/ai/nanoid
A small library to generate unique ids. It is implemented in a lot of other languages too.