in reply to Re: Change default style sheet: add line numbers
in thread Change default style sheet: add line numbers

For me all lines are numbered with 01:

Netscape Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:37.0) Gecko/20100101 Firefox/ +37.0

Since I couldn't guaranty that other settings aren't interfering (there are plenty after 7 years) I tried an alternative account and now it worked for me in FF.

Though testing on Safari/Android didn't show any numbers, but red source code... ¹

Consequence, CSS tricks are fragile and can easily interfere with other settings.

More elementary approaches like demonstrated in Metacpan or perlcommunity.de OTOH are well tested already.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

¹) UPDATE: I was able to fix this, but line-breaks are still lost after copying!

Replies are listed 'Best First'.
Re^3: Change default style sheet: add line numbers
by Anonymous Monk on Apr 05, 2015 at 02:07 UTC

    More elementary approaches like demonstrated in Metacpan or perlcommunity.de OTOH are well tested already.

    Well the perlcommunity.de solution isn't bulletproof, it won't work well with wrapping or font customizations, the line numbers will get out of sync with the code

    the metacpan solution is javascript

      Customizations are always problematic.

      The numbers must have the same fonts and line-height like the code.

      Wrapping just means skipping to number a line.

      Though I prefer the scrolling frame solution there.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!