Input valueAsNumber
5.4.2022
Every once in a while I learn about a JavaScript property that I wish I had known about years earlier — valueAsNumber is one of them. The valueAsNumber provides the value of an input[type=number] as a Number type, instead of the traditional string representation when you get the value:...
Lines to Content Layout Animation
5.4.2022
A simple layout switch example where we go from a typography row view with inline images to a large image preview with more content.
The post Lines to Content Layout Animation appeared first on Codrops
Adding CDN Caching to a Vite Build
4.4.2022
Content delivery networks, or CDNs, allow you to improve the delivery of your website’s static resources, most notably, with CDN caching. They do this by serving your content from edge locations, which are located all over the world. When a …
Adding CDN Caching to a Vite Build originally...
Advanced Code Display with Code Detection API (Sponsored)
4.4.2022
Web apps are accepting numerous types of inputs, from basic text to code to imagery, files, and more. It’s important that we validate the contents we receive but if you do allow arbitrary text, it’s good to know what exactly has been submitted so you can present it properly. Enter...
Collective #705
31.3.2022
Understanding Layout Algorithms * Spruce CSS * PWA Resources * Variable fonts in real life
The post Collective #705 appeared first on Codrops
Tricks to Cut Corners Using CSS Mask and Clip-Path Properties
30.3.2022
We recently covered creating fancy borders with CSS mask properties, and now we are going to cut the corners with CSS mask and clip-path! A lot of techniques exist to cut different shapes from the corners of any element. …
Tricks to Cut Corners Using CSS Mask and Clip-Path Properties...
Building an Interactive Sparkline Graph with D3
29.3.2022
Learn how to build an interactive line graph using the D3 JavaScript library and CSS custom properties to create different color schemes.
The post Building an Interactive Sparkline Graph with D3 appeared first on Codrops
6 Useful Bookmarklets to Boost Web Development
28.3.2022
A bookmarklet is a JavaScript-based bookmark that adds to a web browser. I’d like to show you some awesome web browser hacks to aid your web development workflow and how to convert those hacks into time-saving bookmarklets.
Activating design mode
…
6 Useful Bookmarklets to Boost...
CSS :has
28.3.2022
For as long as developers have written CSS code, we’ve been desperate to have a method to allow styling a parent element based child characteristics. That’s not been possible until now. CSS has introduced the :has pseudo-class which allows styling a parent based on a relative...
Collective #704
24.3.2022
CodeEdit App * CodeSandbox Projects * Lapce * Building a Heatmap Chart Component
The post Collective #704 appeared first on Codrops
Letter Shuffle Animation for a Menu
23.3.2022
A little animation for a big menu where the letters of a word shuffle to become the first letter of each menu item.
The post Letter Shuffle Animation for a Menu appeared first on Codrops
Write HTML, the HTML Way (Not the XHTML Way)
21.3.2022
You may not use XHTML (anymore), but when you write HTML, you may be more influenced by XHTML than you think. You are very likely writing HTML, the XHTML way.
What is the XHTML way of writing HTML, and what …
Write HTML, the HTML Way (Not the XHTML Way) originally published on CSS-Tricks....