nitdoc: add style for highlighted code
authorJean Privat <jean@pryen.org>
Fri, 23 Aug 2013 18:56:00 +0000 (14:56 -0400)
committerJean Privat <jean@pryen.org>
Fri, 23 Aug 2013 18:56:00 +0000 (14:56 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

share/ni_nitdoc/styles/main.css

index 05375d7..4dc4cdc 100644 (file)
@@ -531,3 +531,36 @@ nav h3 a.fold {
   padding: 0 1px;\r
   border-radius: 5px;\r
 }\r
+\r
+.rawcode {\r
+}\r
+\r
+.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */\r
+.nitcode a:hover { text-decoration: underline; } /* underline links */\r
+.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */\r
+/* lexical raw tokens. independent of usage or semantic: */\r
+.nitcode .nc_c { color: gray; font-style: italic; } /* comment */\r
+.nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */\r
+.nitcode .nc_k { font-weight: bold; } /* keyword */\r
+.nitcode .nc_o {} /* operator */\r
+.nitcode .nc_i {} /* standard identifier */\r
+.nitcode .nc_t { color: #445588; font-weight: bold; } /* type/class identifier */\r
+.nitcode .nc_a { color: #445588; font-style: italic; } /* old style attribute identifier */\r
+.nitcode .nc_l { color: #009999; } /* char and number literal */\r
+.nitcode .nc_s { color: #8F1546; } /* string literal */\r
+/* syntactic token usage. added because of their position in the AST */\r
+.nitcode .nc_ast { color: blue; } /* assert label */\r
+.nitcode .nc_la { color: blue; } /* break/continue label */\r
+.nitcode .nc_m { color: #445588; } /* module name */\r
+/* syntactic groups */\r
+.nitcode .nc_def { font-weight: bold; color: blue; } /* name used in a definition */\r
+  .nitcode .nc_def.nc_a { color: blue; } /* name used in a attribute definition */\r
+  .nitcode .nc_def.nc_t { color: blue; } /* name used in a class or vt definition */\r
+.nitcode .nc_ss { color: #9E6BEB; } /* superstrings */\r
+.nitcode .nc_cdef {} /* A whole class definition */\r
+.nitcode .nc_pdef {} /* A whole property definition */\r
+/* semantic token usage */\r
+.nitcode .nc_v { font-style: italic; } /* local variable or parameter */\r
+.nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */\r
+\r
+.nitcode .nc_error { border: 1px red solid;} /* not used */\r