Class: Rouge::Lexers::CSS

Inherits:
RegexLexer show all
Defined in:
lib/rouge/lexers/css.rb

Constant Summary

Constants inherited from RegexLexer

RegexLexer::MAX_NULL_SCANS

Class Method Summary collapse

Methods inherited from RegexLexer

#delegate, get_state, #get_state, #group, #in_state?, #pop!, #push, #reset!, #reset_stack, #run_callback, #run_rule, #stack, start, start_procs, #state, state, #state?, states, #step, #stream_tokens, #token

Methods inherited from Rouge::Lexer

aliases, all, analyze_text, assert_utf8!, #debug, default_options, demo, demo_file, desc, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, #initialize, lex, #lex, mimetypes, #option, #options, register, #reset!, #stream_tokens, tag, #tag

Constructor Details

This class inherits a constructor from Rouge::Lexer

Class Method Details

.attributesObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rouge/lexers/css.rb', line 13

def self.attributes
  @attributes ||= Set.new %w(
    azimuth background background-attachment background-color
    background-image background-position background-repeat
    border border-bottom border-bottom-color border-bottom-style
    border-bottom-width border-collapse border-color border-left
    border-left-color border-left-style border-left-width
    border-right border-right-color border-right-style
    border-right-width border-spacing border-style border-top
    border-top-color border-top-style border-top-width
    border-width bottom caption-side clear clip color content
    counter-increment counter-reset cue cue-after cue-before cursor
    direction display elevation empty-cells float font font-family
    font-size font-size-adjust font-stretch font-style font-variant
    font-weight height left letter-spacing line-height list-style
    list-style-image list-style-position list-style-type margin
    margin-bottom margin-left margin-right margin-top marker-offset
    marks max-height max-width min-height min-width opacity orphans
    outline outline-color outline-style outline-width overflow-x
    overflow-y padding padding-bottom padding-left padding-right
    padding-top page page-break-after page-break-before
    page-break-inside pause pause-after pause-before pitch
    pitch-range play-during position quotes richness right size
    speak speak-header speak-numeral speak-punctuation speech-rate
    src stress table-layout text-align text-decoration text-indent
    text-shadow text-transform top unicode-bidi vertical-align
    visibility voice-family volume white-space widows width
    word-spacing z-index
  )
end

.builtinsObject



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/rouge/lexers/css.rb', line 44

def self.builtins
  @builtins ||= Set.new %w(
    above absolute always armenian aural auto avoid left bottom
    baseline behind below bidi-override blink block bold bolder
    both bottom capitalize center center-left center-right circle
    cjk-ideographic close-quote collapse condensed continuous crop
    cross crosshair cursive dashed decimal decimal-leading-zero
    default digits disc dotted double e-resize embed expanded
    extra-condensed extra-expanded fantasy far-left far-right fast
    faster fixed georgian groove hebrew help hidden hide high higher
    hiragana hiragana-iroha icon inherit inline inline-table inset
    inside invert italic justify katakana katakana-iroha landscape
    large larger left left-side leftwards level lighter line-through
    list-item loud low lower lower-alpha lower-greek lower-roman
    lowercase ltr medium message-box middle mix monospace n-resize
    narrower ne-resize no-close-quote no-open-quote no-repeat none
    normal nowrap nw-resize oblique once open-quote outset outside
    overline pointer portrait px relative repeat repeat-x repeat-y
    rgb ridge right right-side rightwards s-resize sans-serif scroll
    se-resize semi-condensed semi-expanded separate serif show
    silent slow slower small-caps small-caption smaller soft solid
    spell-out square static status-bar super sw-resize table-caption
    table-cell table-column table-column-group table-footer-group
    table-header-group table-row table-row-group text text-bottom
    text-top thick thin top transparent ultra-condensed
    ultra-expanded underline upper-alpha upper-latin upper-roman
    uppercase url visible w-resize wait wider x-fast x-high x-large
    x-loud x-low x-small x-soft xx-large xx-small yes
  )
end

.constantsObject



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/rouge/lexers/css.rb', line 75

def self.constants
  @constants ||= Set.new %w(
    indigo gold firebrick indianred yellow darkolivegreen
    darkseagreen mediumvioletred mediumorchid chartreuse
    mediumslateblue black springgreen crimson lightsalmon brown
    turquoise olivedrab cyan silver skyblue gray darkturquoise
    goldenrod darkgreen darkviolet darkgray lightpink teal
    darkmagenta lightgoldenrodyellow lavender yellowgreen thistle
    violet navy orchid blue ghostwhite honeydew cornflowerblue
    darkblue darkkhaki mediumpurple cornsilk red bisque slategray
    darkcyan khaki wheat deepskyblue darkred steelblue aliceblue
    gainsboro mediumturquoise floralwhite coral purple lightgrey
    lightcyan darksalmon beige azure lightsteelblue oldlace
    greenyellow royalblue lightseagreen mistyrose sienna lightcoral
    orangered navajowhite lime palegreen burlywood seashell
    mediumspringgreen fuchsia papayawhip blanchedalmond peru
    aquamarine white darkslategray ivory dodgerblue lemonchiffon
    chocolate orange forestgreen slateblue olive mintcream
    antiquewhite darkorange cadetblue moccasin limegreen saddlebrown
    darkslateblue lightskyblue deeppink plum aqua darkgoldenrod
    maroon sandybrown magenta tan rosybrown pink lightblue
    palevioletred mediumseagreen dimgray powderblue seagreen snow
    mediumblue midnightblue paleturquoise palegoldenrod whitesmoke
    darkorchid salmon lightslategray lawngreen lightgreen tomato
    hotpink lightyellow lavenderblush linen mediumaquamarine green
    blueviolet peachpuff
  )
end

.vendor_prefixesObject



105
106
107
108
109
110
# File 'lib/rouge/lexers/css.rb', line 105

def self.vendor_prefixes
  @vendor_prefixes ||= Set.new %w(
    -ah- -atsc- -hp- -khtml- -moz- -ms- -o- -rim- -ro- -tc- -wap-
    -webkit- -xv- mso- prince-
  )
end