62 lines
8.3 KiB
Text
62 lines
8.3 KiB
Text
syntax "css" "\.css$"
|
|
|
|
# Resets everything back to plain text coloring.
|
|
# Can be used at the start of each theme file.
|
|
color white "^.*$"
|
|
color yellow ":not\([A-Za-z][A-Za-z0-9]*\)"
|
|
color white start="\{" end="\}"
|
|
|
|
#
|
|
# CSS3 Selectors
|
|
#
|
|
color white "(^|\*/|[][:space:],}>+~()])(a|abbr|acronym|address|area|article|applet|aside|audio|b|base|bd[io]|bgsound|big|blink|blockquote|body|(no)?br|button|canvas|caption|center|cite|code|(col)?group|command|content|datalist|d[dlt]|del|details|dfn|dialog|dir|div|em|embed|eventsource|fieldset|figcaption|figure|(base)?font|footer|form|frame(set)?|h[1-6]|head(er)?|hgroup|hr|html|i|iframe|img|input|ins|isindex|kbd|keygen|label|legend|li|link|listing|main|map|mark|marquee|menu(item)?|meta|meter|nav|noframes|object|[ou]l|optgroup|option|output|p|param|plaintext|pre|progress|q|r[pt]|ruby|s|samp|(no)?script|section|select|shadow|small|source|spacer|span|strike|strong|style|su[bp]|summary|table|t(body|foot|head)|t[dhr]|template|textarea|time|title|track|tt|u|var|video|wbr|xmp)([[:space:],#.{[>+~:)]|/\*|$)"
|
|
color white "(^|[][:space:],}])\*([[:space:],{:[]|$)"
|
|
|
|
color yellow "[[:space:]]*[>+~][[:space:]]*"
|
|
color yellow ":(active|checked|(dis|en)abled|empty|(first|last|only)-(child|of-type)|focus|hover|in-range|link|optional|out-of-range|read-(only|write)|required|root|selection|target|visited|(in)?valid|visited)\>"
|
|
color blue "[.#][A-Za-z_][A-Za-z0-9_-]*"
|
|
color yellow "::(after|before|first-(letter|line)|selection)\>"
|
|
color red "\!important[[:space:]]*(;|/\*|$)"
|
|
|
|
#
|
|
# CSS3 Keywords (predefined property-values mostly)
|
|
#
|
|
color red "(^|}|\*/)[[:space:]]*@(font-face|media)\>"
|
|
color red "\<(above|absolute|always|armenian|auto|avoid|baseline|behind|below|bidi-override|blink|block|bold(er)?|bottom|break-word|capitalize|center(-left|-right)?|circle|collapse|cjk-ideographic|(no-)?(close|open)-quote|compact|continuous|crop|cross(hair)?|(extra-|semi-|ultra-)?(condensed|expanded)|cursive|dashed|default|decimal(-leading-zero)?|digits|disc|dotted|double|embed|fantasy|far-(left|right)|fast(er)?|fixed|georgian|groove|hebrew|help|hide|high(er)?|(hirag|katak)ana(-iroha)?|inherit|initial|inline(-block|-table)?|(in|out)(set|side)|invert|italic|justify|landscape|larger?|(left|right)(-side|wards)?|level|lighter|line-through|list-item|loud|low(er)?|ltr|(lower|upper)(-alpha|-greek|-latin|-roman|case)|marker|medium|middle|mix|monospace|move|narrower|none|normal|(no|pre-)wrap|oblique|once|overline|pointer|portait|relative|(no-)?repeat|repeat-[xy]|([ew]|[ns][ew]?)-resize|ridge|rlt|run-in|scroll|separate|(sans-)?serif|show|silent|slow(er)?|small(er)?|small-caps|soft|solid|spell-out|square|static|sub|super|text(-bottom|-top)?|thick|thin|top|table-(caption|cell|(column|row)(-group)?|(footer|header)-group)|underline|unset|visible|wait|wider|x-(fast|high|loud|s?low|soft)|xx?-(large|small))([[:space:];,]|/\*|$)"
|
|
|
|
#
|
|
# CSS3 Color Keywords
|
|
#
|
|
color yellow "(^|\*/|[[:space:]:])(currentColor|transparent)([[:space:];]|/\*|$)"
|
|
# The following section for CSS3 colors is generated automatically.
|
|
# See included generate-rules-for-web-highlighting.sh script file (found in the scripts/
|
|
# directory) for more info on how this process can be repeated should
|
|
# the list of CSS3 colors be changed in the future
|
|
color yellow "(^|\*/|[[:space:]:])(aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)([[:space:];]|/\*|$)"
|
|
|
|
#
|
|
# CSS3 Properties
|
|
#
|
|
color red "(^|\*/|[[:space:]({;])(align-(content|items|self)|alignment-(adjust|baseline)|all|animation(-delay|-direction|-duration|-fill-mode|-iteration-count|-name|-play-state|-timing-function)?|azimuth|backface-visibility|baseline-shift|bleed|background(-attachment|-blend-mode|-clip|-color|-image|-origin|-position|-repeat|-size)?|bookmark-(label|level|state|target)|border(-bottom|-left|-right|-top)?(-color|-style|-width)?|border-(((bottom|top)-(left|right)-)?radius|(collapse|image(-(outset|repeat|slice|source|width))?|spacing))|bottom|box-(decoration-break|shadow|sizing)|break-(after|before|inside)|caption-side|clear|clip|color(-profile)?|column-(count|fill|gap|rule|rule-(color|style|width)|span|width)|columns|content|counter-(increment|(re)?set)|crop|(cue|mark|pause)(-after|-before)?|cursor|direction|display|drop-initial-((after|before)-(adjust|align)|size|value)|dominant-baseline|elevation|empty-cells|filter|flex(-(basis|direction|flow|grow|shrink|wrap))?|float(-offset)?|font|font-(family|feature-settings|kerning|language-override|size(-adjust)?|stretch|style|synthesis|variant|weight|variant-(alternates|caps|east-asian|ligatures|numeric|position))|grid-(column|row)|hanging-punctuation|height|hyphens|icon|image-(orientation|rendering|resolution)|ime-mode|inline-box-align|justify-content|left|letter-spacing|line-(break|height|stacking(-ruby|-shift|-strategy)?|style|style-(image|position|type))|(margin|padding)(-bottom|-left|-right|-top)?|marker-(offset|side)|marks|marquee-(direction|play-count|speed|style)|mask(-type)?|(max|min)-(height|width)|max-lines|move-to|nav-(down|index|left|right|up)|object-(fit|position)|opacity|order|orphans|outline(-(color|offset|style|width))?|overflow(-wrap|-x|-y)?|page(-break-(after|before|inside)|-policy)?|perspective(-origin)?|phonemes|pitch(-range)?|play-during|position|presentation-level|quotes|rendering-intent|resize|richness|right|rest(-after|-before)?|rotation|rotation-point|ruby-(align|position)|size|speak(-(as|header|numeral|punctuation))?|speech-rate|stress(-set)?|tab-size|table-layout|target(-name|-new|-position)?|text-(align(-last)?|combine-upright|decoration|decoration-(color|line|skip|style)|emphasis(-color|-position|-style)?|height|indent|justify|orientation|overflow|shadow|transform|underline-position)|top|transform(-origin|-style)?|transition|unicode-bidi|vertical-align|transition-(delay|duration|property|timing-function)|voice-(balance|duration|family|pitch(-range)?|range|rate|stress|volume)|visibility|volume|white-space|widows|width|word-(break|spacing|wrap)|writing-mode|z-index)[[:space:]]*:"
|
|
color brightyellow "(^|\*/|[[:space:]({;])-(ms|moz|apple|khtml|wap|webkit|o|xv)(-[a-z]+)+[[:space:]]*:"
|
|
|
|
color brightblue "(^|\*/|[[:space:]:])url\([^)]+\)([[:space:];}]|$)"
|
|
color cyan "(^|\*/|[[:space:]:])(attr|calc|(repeating-)?(linear|radial)-gradient|(rgb|hsl)a?)\([^)]+\)([[:space:];}]|$)"
|
|
color cyan "(^|\*/|[[:space:]:])url\("
|
|
# Make white spaces plain again
|
|
color white "[[:space:]]+"~OPERATOR: ":nth-(last-)?(child|of-type)\([[:space:]]*([+-]?[0-9]+(n[[:space:]]*\+[[:space:]]*[0-9]+)?|odd|even)[[:space:]]*\)"
|
|
color yellow ":lang\([[:space:]]*[A-Za-z]{2}(-[A-Za-z]{2})?[[:space:]]*\)"
|
|
color red "\[[^][]*\]"
|
|
color yellow "[;:(){}]"
|
|
|
|
color white ","
|
|
color brightwhite "\<(odd|even)\>"
|
|
color brightwhite "\<[0-9][0-9]*n?"
|
|
color brightwhite "[\+-]?([0-9]+|[0-9]*\.[0-9]+)(%|e(m|x)|p(x|t|c)|in|ft|(m|c)m|k?Hz|deg|g?rad|m?s)"
|
|
color yellow "#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})\>"
|
|
color green ""[^"]*"|'[^']*'"
|
|
color brightblack start="/\*" end="\*/"
|
|
color brightwhite,cyan "\<TODO\>:?"
|
|
color brightwhite,cyan "\<FIXME\>:?"
|
|
color ,red "[[:space:]]+$"
|
|
color brightyellow " + +| + +"
|