]> git.ardis.lu - ard.is/commitdiff
Scope ::highlight to <pre>
authorArdis Lu <ardisglu@gmail.com>
Mon, 27 May 2024 00:03:09 +0000 (17:03 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 27 May 2024 00:03:09 +0000 (17:03 -0700)
To reduce clutter in DevTools styles pane

index.html

index 1af9df83ce5ef2327bd022c38c15cdba72a5e315..8375734ecce921443f236ddd2acd804b789af491 100644 (file)
         highlightStyle.textContent = '';
         highlights.forEach((highlight, i) => {
           CSS.highlights.set(`c${i}`, new Highlight(...highlight));
-          highlightStyle.textContent += `::highlight(c${i}){color:hsl(${i * 36}deg 50% 50%)}`;
+          highlightStyle.textContent += `pre::highlight(c${i}){color:hsl(${i * 36}deg 50% 50%)}`;
         });
       }
     });
This page took 0.038234 seconds and 4 git commands to generate.