--- 
name: CSS
fileTypes: 
- css
scopeName: source.css
repository: 
  string-single: 
    name: string.quoted.single.css
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.css
    begin: "'"
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.css
    end: "'"
    patterns: 
    - name: constant.character.escape.css
      match: \\.
  string-double: 
    name: string.quoted.double.css
    endCaptures: 
      "0": 
        name: punctuation.definition.string.end.css
    begin: "\""
    beginCaptures: 
      "0": 
        name: punctuation.definition.string.begin.css
    end: "\""
    patterns: 
    - name: constant.character.escape.css
      match: \\.
  comment-block: 
    name: comment.block.css
    captures: 
      "0": 
        name: punctuation.definition.comment.css
    begin: /\*
    end: \*/
uuid: 69AA0917-B7BB-11D9-A7E2-000D93C8BE28
foldingStartMarker: /\*\*(?!\*)|\{\s*($|/\*(?!.*?\*/.*\S))
patterns: 
- name: meta.selector.css
  begin: ^(?=\s*[:.*#a-zA-Z])
  end: (?=\{)
  patterns: 
  - include: "#comment-block"
  - name: entity.name.tag.css
    match: \b(a|abbr|acronym|address|area|b|base|big|blockquote|body|br|button|caption|cite|code|col|colgroup|dd|del|dfn|div|dl|dt|em|fieldset|form|frame|frameset|(h[1-6])|head|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|meta|noframes|noscript|object|ol|optgroup|option|p|param|pre|q|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|ul|var)\b
  - name: entity.other.attribute-name.class.css
    captures: 
      "1": 
        name: punctuation.definition.entity.css
    match: (\.)[a-zA-Z0-9_-]+
  - name: entity.other.attribute-name.id.css
    captures: 
      "1": 
        name: punctuation.definition.entity.css
    match: (#)[a-zA-Z][a-zA-Z0-9_-]*
  - name: entity.name.tag.wildcard.css
    match: \*
  - name: entity.other.attribute-name.pseudo-element.css
    captures: 
      "1": 
        name: punctuation.definition.entity.css
    match: (:+)\b(after|before|first-child|first-letter|first-line|selection)\b
  - name: entity.other.attribute-name.pseudo-class.css
    captures: 
      "1": 
        name: punctuation.definition.entity.css
    match: (:)\b(active|hover|link|visited|focus)\b
  - name: meta.attribute-selector.css
    captures: 
      "6": 
        name: punctuation.definition.string.begin.css
      "7": 
        name: punctuation.definition.string.end.css
      "1": 
        name: punctuation.definition.entity.css
      "2": 
        name: entity.other.attribute-name.attribute.css
      "3": 
        name: punctuation.separator.operator.css
      "4": 
        name: string.unquoted.attribute-value.css
      "5": 
        name: string.quoted.double.attribute-value.css
    match: (?i)(\[)\s*(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)(?:\s*([~|^$*]?=)\s*(?:(-?[_a-z\\[[:^ascii:]]][_a-z0-9\-\\[[:^ascii:]]]*)|((?>(['"])(?:[^\\]|\\.)*?(\6)))))?\s*(\])
- include: "#comment-block"
- name: meta.at-rule.import.css
  captures: 
    "1": 
      name: keyword.control.at-rule.import.css
    "2": 
      name: punctuation.definition.keyword.css
  begin: ^\s*((@)import\b)
  end: \s*((?=;|\}))
  patterns: 
  - include: "#string-double"
  - endCaptures: 
      "1": 
        name: punctuation.section.function.css
    begin: (url)\s*(\()\s*
    beginCaptures: 
      "1": 
        name: support.function.url.css
      "2": 
        name: punctuation.section.function.css
    end: \s*(\))\s*
    patterns: 
    - name: variable.parameter.url.css
      match: "[^'\") \\t]+"
    - include: "#string-single"
    - include: "#string-double"
- name: meta.at-rule.media.css
  captures: 
    "1": 
      name: keyword.control.at-rule.media.css
    "2": 
      name: punctuation.definition.keyword.css
    "3": 
      name: support.constant.media.css
  begin: ^\s*((@)media)\s+(((all|aural|braille|embossed|handheld|print|projection|screen|tty|tv)\s*,?\s*)+)\s*{
  end: \s*((?=;|\}))
  patterns: 
  - include: $self
- name: meta.property-list.css
  captures: 
    "0": 
      name: punctuation.section.property-list.css
  begin: \{
  end: \}
  patterns: 
  - include: "#comment-block"
  - name: meta.property-name.css
    begin: (?<![-a-z])(?=[-a-z])
    end: $|(?![-a-z])
    patterns: 
    - name: support.type.property-name.css
      match: \b(azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow(-[xy])?|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|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)\b
  - name: meta.property-value.css
    endCaptures: 
      "1": 
        name: punctuation.terminator.rule.css
    begin: (:)\s*
    beginCaptures: 
      "1": 
        name: punctuation.separator.key-value.css
    end: \s*(;|(?=\}))
    patterns: 
    - name: support.constant.property-value.css
      match: \b(absolute|all-scroll|always|auto|baseline|below|bidi-override|block|bold|bolder|both|bottom|break-all|break-word|capitalize|center|char|circle|col-resize|collapse|crosshair|dashed|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|groove|hand|help|hidden|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace)\b
    - name: support.constant.font-name.css
      match: (\b(?i:arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace)\b)
    - name: support.constant.color.w3c-standard-color-name.css
      match: \b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow)\b
      comment: http://www.w3schools.com/css/css_colors.asp
    - name: invalid.deprecated.color.w3c-non-standard-color-name.css
      match: \b(seagreen|hotpink|lawngreen|darkgreen|violet|darkred|crimson|green|sandybrown|navy|magenta|darkslategray|steelblue|silver|darkgrey|mistyrose|gray|aliceblue|blueviolet|lightpink|saddlebrown|chocolate|limegreen|lightslategray|yellowgreen|pink|lightskyblue|indigo|lightblue|floralwhite|navajowhite|mediumvioletred|honeydew|aquamarine|blue|olivedrab|palegreen|slategray|lavenderblush|wheat|moccasin|mediumturquoise|mediumspringgreen|lightcoral|mintcream|tomato|lightgrey|black|darkmagenta|dimgray|darkturquoise|midnightblue|plum|indianred|coral|lightcyan|mediumslateblue|darkcyan|darkslateblue|darkkhaki|ivory|azure|khaki|powderblue|darkgoldenrod|orangered|burlywood|turquoise|royalblue|maroon|cornsilk|antiquewhite|yellow|teal|orange|grey|darkslategrey|slateblue|seashell|darkorchid|snow|lightslategrey|cyan|greenyellow|palevioletred|goldenrod|deepskyblue|lightyellow|lightseagreen|sienna|lemonchiffon|darkviolet|paleturquoise|slategrey|skyblue|purple|mediumpurple|cadetblue|fuchsia|chartreuse|darksalmon|lightgoldenrodyellow|white|springgreen|olive|forestgreen|peachpuff|peru|dimgrey|mediumseagreen|thistle|firebrick|darkgray|mediumaquamarine|darkolivegreen|mediumblue|palegoldenrod|blanchedalmond|ghostwhite|gold|gainsboro|darkseagreen|cornflowerblue|lime|lavender|beige|orchid|mediumorchid|whitesmoke|bisque|lightgray|tan|salmon|rosybrown|red|dodgerblue|brown|aqua|oldlace|deeppink|papayawhip|lightsalmon|lightsteelblue|darkorange|darkblue|linen|lightgreen)\b
      comment: "These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp"
    - name: constant.numeric.css
      match: (-|\+)?\s*[0-9]+(\.[0-9]+)?
    - name: keyword.other.unit.css
      match: (?<=[\d])(px|pt|cm|mm|in|em|ex|pc)\b|%
    - name: constant.other.color.rgb-value.css
      captures: 
        "1": 
          name: punctuation.definition.constant.css
      match: (#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b
    - include: "#string-double"
    - include: "#string-single"
    - endCaptures: 
        "1": 
          name: punctuation.section.function.css
      begin: (rgb|url|attr|counter|counters)\s*(\()
      beginCaptures: 
        "1": 
          name: support.function.misc.css
        "2": 
          name: punctuation.section.function.css
      end: (\))
      patterns: 
      - include: "#string-single"
      - include: "#string-double"
      - name: constant.other.color.rgb-value.css
        match: (\b0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\s*,\s*)(0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\s*,\s*)(0*((1?[0-9]{1,2})|(2([0-4][0-9]|5[0-5])))\b)
      - name: constant.other.color.rgb-percentage.css
        match: \b([0-9]{1,2}|100)\s*%,\s*([0-9]{1,2}|100)\s*%,\s*([0-9]{1,2}|100)\s*%
      - name: variable.parameter.misc.css
        match: "[^'\") \\t]+"
    - name: keyword.other.important.css
      match: \!\s*important
foldingStopMarker: (?<!\*)\*\*/|^\s*\}
keyEquivalent: ^~C
comment: ""
