news
today's howtos
-
TecMint ☛ How to Use the watch Command in Linux to Monitor Commands in Real Time
Running the same command every few seconds quickly becomes repetitive, and it’s easy to miss an important change. That’s where the watch command comes in.
-
ID Root ☛ How To Install Cockpit on Fedora 44
Managing a Fedora server entirely through SSH works well—until it does not.
-
ID Root ☛ How To Install Redis on Ubuntu 26.04 LTS
-
Sal ☛ Finding my draft posts with ripgrep
Anyway, today I found a nice snippet that lists all my blog posts that are still in draft status: [...]
-
Leon Mika ☛ SSH Cheatsheet - Leon Mika
Various techniques for working with SSH.
-
Dominick Jay ☛ You Don't Need JavaScript to Highlight Hash Targets
Having a table of contents on a page full of rich text is a pretty common pattern, one exists on this page for the sheer ease of being able to jump through the content more decisively. Each item in the contents list jumps to a heading on the page instantly. Not particularly groundbreaking. But the ‘jump’ is the only feedback that’s typically given. Was it this heading I’ve gone to? the paragraph below it? the whole section? The ‘jump’ could be missed; scrolling after the click, navigating with a screen reader (where the scroll position isn’t announced) or merely blinked, then that context is gone in an instant.
The usual fix has been to add extra feedback with Javascript, typically having a scroll listener watching for hash changes which toggles a highlight class on whatever element matches. Which works…but it’s extra weight to deal with something the browser already knows. It’s got the info on what text a hash link points to, because it just sent you there. It’s also a brittle solution most of the time. An edge case gets missed, like a hash that doesn’t map to an id, nested headings or content that loaded after the listener initialised, and the highlight just doesn’t fire.
::target-text sidesteps all of that to use the case it’s built for. A real navigation to a real destination on the page. No listener, no class toggling, no JS to maintain. The browser handles the targeting and you just style what it hands you.