tel8618217223380 / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Linenumbers dont work #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Although adding the linenums class to my pre like:

<div class="src_view">
   <ul class="file_meta">
        <li>{{ file.user }}</li>
        <li>{{ file.file }}</li>
   </ul>
   <pre class="prettyprint linenums">{{ file.file.read }}</pre>

</div>

i dont see any linenums. HTML items are in the sourcecode but not displayed in 
Firefox 5 nor Chromium 12

Original issue reported on code.google.com by nukeawhale@gmail.com on 28 Jun 2011 at 1:07

Attachments:

GoogleCodeExporter commented 9 years ago
Problem was a css reset stylesheet. After removing it, line-numbers were shown 
correctly. IMO this should be declared in the default stylesheet, so that even 
with a css reset, line-numbers are shown

Original comment by nukeawhale@gmail.com on 28 Jun 2011 at 2:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
What's a CSS reset stylesheet?  What would you like to see declared in the 
default stylesheet?

Currently, the default stylesheet, prettify.css, has

/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: none }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 { background: #eee }

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 6:38

GoogleCodeExporter commented 9 years ago
Closing for lack of activity.

Original comment by mikesamuel@gmail.com on 5 Feb 2013 at 12:37