Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If you extend source code with line numbers, make sure those aren’t selectable

[shakes fist at so many blogs]



Mhmm... 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.


Something 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: