5 ms·
Unrelated to the article directly, it's kinda neat that the site's text selection highlight color is randomized on every mousedown.
by dag11 3y ago
Unrelated to the article directly, it's kinda neat that the site's text selection highlight color is randomized on every mousedown.
- farkanoid 3y agoI'm ashamed to admit that I spent more time highlighting random snippets of text than I did reading the article.
- cypherpunks01 3y ago/* Text Higlight Color /**/ :root { --highlight-color: null; } ::selection { background: var(--highlight-color); color:#FFFFFF; } ::-moz-selection { /* Code for Firefox */ color: #FFFFFF; background: var(--highlight-color); } </style> <!-- Text Highlight --> <script> const colors = ["#F76808", "#30A46C", "#0091FF", "#6E56CF", "#E5484D"]; window.addEventListener("mousedown", (e) => { const color = colors.shift(); document.documentElement.style.setProperty("--highlight-color", color); colors.push(color); }); </script>
- deleted 3y ago[deleted]
- pronouncedjerry 3y agodid cursor-fidgeting-while-reading lead to this discovery?
- netsharc 3y agoI used to do this, I had to retire several mice because the underneath of the left mouse button was worn away from hitting the micro-switch so much..
- vitiral 3y agoI went back just to see and it chose WHITE as the first option, making the text invisible lol
- caydenm 3y agoJosh on our team is so happy people discovered and liked his easter egg!
- iSnow 3y agoOn the other hand, as someone with ADHD who is easily distracted, I couldn't even finish reading the article. Those GIFs are super annoying and don't play once, no they play again and again. Sad, because it sounded interesting, but no way I could focus enough to actually comprehend it.
- gsliepen 3y agoHowever, setting the highlight color to pure white in the CSS isn't very nice for people who load the page with JavaScript disabled.