4 ms·
> If you extend source code with line numbers, make sure those aren’t selectable [shakes fist at so many blogs]
by Grimburger 3y ago
> If you extend source code with line numbers, make sure those aren’t selectable
[shakes fist at so many blogs]
- ben165 3y agoMhmm... if you don't want to make it selectable you need wonderful JS or tables to seperate it? Makes thing more complicated. Just remove the line numbers, every editor can mark in block mode today. Some snippets won't work without further code anyways.
- positus 3y agoSomething like... .line-number { user-select: none; -moz-user-select: none; -webkit-user-select: none; } ...should be sufficient to prevent that bit from being selected without JS.