Melin's Blog

Latest posts

See all posts
  • 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...
  • ES6 Template Strings in HTML Template Rendering
    ES6 template strings, also called template literals, are one of those JavaScript features that feel small at first, then quietly remove a lot of friction from everyday UI work....
  • On a Sunday afternoon, while sitting in my study, I suddenly wondered: if an element, such as a `<label>` element, could respond to the state changes of a radio button or checkbox no matter where it is on the page, wouldn’t that make it possible to handle almost every click interaction on the page in one shot? That would be seriously awesome!
    But is it actually that awesome? Let’s take a closer look. The Starting Point: Most Click Interactions Are State Toggles If we strip many common click interactions down to their...
© 2026 • Melin
Press Esc or click anywhere to close