I figured out GitHub's styles mostly by brute force, looking at source listings
and eyeballing the class=
attributes. Here are the notes I took along the way
for each class. It's by no means complete and only represents what I observed in
the few files I checked.
-
bp
: Special variable e.g.__FILE__
orNone
-
Comments
c
: HTML, CSS commentc1
: Single-line comment (# ...
or// ...
)cm
: Multi-line comment (/* ... */
)cp
: Declaration e.g.#include ...
or<!DOCTYPE ...>
-
Diffs
gd
: Diff deletiongd.x
: Diff inline deletiongi
: Diff insertiongi.x
: Diff inline insertion
-
Keywords
k
: Keyword e.g.this
,else
,do
, or CSS'smargin
,bold
kd
: Variable, function declarationkt
: Type e.g.int
,void
-
Literals
m
: Literal value e.g.800px
in CSSmi
: Integer value e.g.55
,8L
mf
: Float value e.g.1.5
-
Identifiers/variable names
n
: Genericna
: HTML attribute name e.g.href=
nb
: Declarations and special words, e.g.document
in JavaScript,require
in Ruby,NULL
in Cnc
: CSS class rule, Ruby class declarationnf
: CSS id rule, C function declarationno
: Ruby constantnn
: Python module name e.g. "utils" inimport utils
nt
: HTML tag, Haml tag, CSS tag rulenv
: Bash variable namenx
: JavaScript variable name or function call
-
o
: Operators and symbols, e.g.:
,=
,+
,=>
,::
-
p
: Brackets and grouping symbols, e.g.{}
,[]
,()
,,
in JavaScript,/
in Haml (e.g.%br/
) -
px
: Property in JavaScript, e.g. "log" inconsole.log
-
Strings
s
: Quoted HTML attribute values1
: Single-quoted strings2
: Double-quoted stringss
: Ruby symbol (:through
)se
:\
in Bash (line continuation)si
: String interpolationsr
: Regular expression
-
Variables
vc
: Class variablevg
: Global variablevi
: Instance variable