Melin's Blog

Latest posts

See all posts
  • 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...
  • Trying JavaScript `IntersectionObserver` to Link Headings and Navigation
    Long documentation pages often need a table of contents that follows the reader. As the user scrolls, the navigation item for the current section should become active. The tradi...
© 2026 • Melin
Press Esc or click anywhere to close