Melin's Blog

Latest posts

See all posts
  • Practical Notes on JavaScript Events for Two-Finger Image Zoom on Mobile
    Implementing image zoom on mobile sounds simple until you try to debug real two-finger gestures in the browser. The tricky part is not only applying transform: scale() to an ima...
  • JS Pure Front-End Audio Trimming: Cut, Copy, Play, and Upload Audio in the Browser
    Users often upload full audio files when your product only needs a short clip. A typical music file may run 3-5 minutes, but the business requirement might only need the first 1...
  • A Handy Tip for Passing Parameters with JavaScript `CustomEvent`
    JavaScript events are not limited to browser-native interactions like clicks, typing, or mouse movement. You can also create your own events, dispatch them manually, and pass da...
  • A Practical Polyfill for the New CSS `attr()` Syntax
    Inspired by Zhang Xinxu’s original article on CSS attr() polyfilling, with updated context for modern browser support. For years, CSS attr() was useful but frustratingly limited...
  • Cleverly Using CSS `var()` Variables to Implement Arbitrary Custom CSS Syntax
    CSS custom properties are usually introduced as reusable values: But they are more powerful than that. A custom property can store almost any token sequence, including syntax th...
© 2026 • Melin
Press Esc or click anywhere to close