RSSAmplifier

Blog

Marko Denic Tech

markodenic.techRSS feed ↗10 posts

Latest posts

A before/after image slider in 2 lines of JavaScript

The plugin you were about to install is just input[type=range]. Stack two images, clip one, done. Works with the keyboard too.

Delete your auto-resize textarea script

The CSS property field-sizing: content replaces your auto-resize textarea script. One line, no input listener, no scrollHeight. Plus the limits to set.

Give your site the Cmd+K menu users expect

Linear and GitHub both have it. Build the same command palette with the dialog element, one keydown listener, and a filter. No libraries.

How to build a swipeable carousel with just CSS

You don't need a carousel library. Six lines of CSS scroll snap will do it.

Turn any table sortable in 20 lines

Make any HTML table sortable in 20 lines of vanilla JS.

How to stop a sticky header from covering your headings

One line of CSS fixes every anchor link that jumps behind your fixed header

How to stop a modal from scrolling the page behind it

One CSS property stops scroll from leaking out of a modal or sidebar into the page behind it. No JavaScript scroll locking needed.

How to read and update URL query params without regex

URLSearchParams reads, sets, and removes query string values with a clean API. No string splitting, no manual parsing.

How to stop a search box from firing 20 requests at once.

A debounce function waits until the user stops typing before firing the request. Ten lines of code, zero libraries, fixes one of the most common performance bugs.

How to build a responsive grid without a single media query.

One line of CSS creates a grid that fits as many columns as possible at any screen size. No breakpoints, no JavaScript, no framework needed.