hexo-theme-landscape icon indicating copy to clipboard operation
hexo-theme-landscape copied to clipboard

Prevent accidental mouse selection of code line numbers

Open therealmarv opened this issue 11 years ago • 3 comments

People often copy&paste code/text from code boxes with a mouse. In the former CSS the selection of line numbers happened too often because the line numbers had CSS padding on the right side. By moving this padding to the left side of the text we can better prevent an accidental selection of line numbers.

therealmarv avatar Aug 30 '14 00:08 therealmarv

You should use margin instead of padding, or it will generate redundant padding when gutter is disabled.

Before

2014-09-06 22 03 43

After

2014-09-06 22 03 54

tommy351 avatar Sep 06 '14 14:09 tommy351

@therealmarv How about your idea on change padding into margin ?

Xuanwo avatar Dec 02 '15 08:12 Xuanwo

How about using user-select: none;?

stevenjoezhang avatar Jun 02 '20 08:06 stevenjoezhang

Superseded by https://github.com/hexojs/hexo-theme-landscape/pull/201 Thanks for your contribution!

stevenjoezhang avatar Apr 19 '23 08:04 stevenjoezhang