Does anybody has an example for the .fun, .var, .dec, and ol.linenums css styles?

40 views
Skip to first unread message

jmeile

unread,
Jun 25, 2012, 6:05:21 AM6/25/12
to js-code-prettifier
Hi

I already setup my own js-code-prettifier and it is working. However,
I don't know yet where are this css styles: .fun, .var, .dec, and
ol.linenums used? According to the default style "prettify.css" these
are the meanings:

.fun = a function name
.var = a variable name
.dec = a declaration

I set them all to be red:
pre .fun, code .fun {
color: #F00;
}
pre .dec, code .dec, pre .var, code .var {
color: #F00;
}
ol.linenums {
margin-top: 0;
margin-bottom: 0;
color: #F00;
}

Howerver, if you see my example here: http://technosoftgratis.okidoki.com.co/paginas/test.php,
you won't see anything red there. My logic tells me that:
1) The function "fib" from the bash script (Line 4) should be red
2) Lines 5 and 6 from the bash script shoud be red. They are variable
declarations.
3) "a" should be red in line 8 from the bash script. It is a variable
name, isn't it?

Does anybody has an example that use them? The documentation refers
you to the examples, but they aren't clear about this.

Finally, I saw that in the dessert.css and sunburst.css examples, this
is written:
/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE
indents via margin-left */

What is the purpose of "color: #AEAEAE". I set it to red, but I don't
see what this does?

Best regards
Josef Meile
Reply all
Reply to author
Forward
0 new messages