{
  "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
  "name": "CSS (Styled Components)",
  "patterns": [
    {
      "include": "#general"
    },
    {
      "include": "#rules"
    },
    {
      "include": "#property_list"
    },
    {
      "include": "#at_rule_media"
    },
    {
      "include": "#at_rule_import"
    },
    {
      "include": "#at_rule_fontface"
    },
    {
      "include": "#at_rule_page"
    },
    {
      "include": "#at_rule_keyframes"
    },
    {
      "include": "#at_rule_supports"
    },
    {
      "include": "#at_rule_custom_single"
    },
    {
      "include": "#at_rule_custom"
    },
    {
      "match": ";",
      "name": "punctuation.terminator.rule.css"
    },
    {
      "include": "#properties"
    }
  ],
  "repository": {
    "at_rule_fontface": {
      "patterns": [
        {
          "begin": "^\\s*((@)font-face\\b)",
          "beginCaptures": {
            "1": {
              "name": "keyword.control.at-rule.fontface.scss"
            },
            "2": {
              "name": "punctuation.definition.keyword.scss"
            }
          },
          "end": "\\s*(?={)",
          "name": "meta.at-rule.fontface.scss",
          "patterns": [
            {
              "include": "#function_attributes"
            }
          ]
        }
      ]
    },
    "at_rule_import": {
      "begin": "\\s*((@)import\\b)\\s*",
      "captures": {
        "1": {
          "name": "keyword.control.at-rule.import.scss"
        },
        "2": {
          "name": "punctuation.definition.keyword.scss"
        }
      },
      "end": "\\s*((?=;)|(?=}))",
      "name": "meta.at-rule.import.scss",
      "patterns": [
        {
          "include": "#interpolation"
        },
        {
          "include": "#string_single"
        },
        {
          "include": "#string_double"
        },
        {
          "include": "#functions"
        }
      ]
    },
    "at_rule_keyframes": {
      "begin": "(?<=^|\\s)(@)(?:-(?:webkit|moz)-)?keyframes\\b",
      "beginCaptures": {
        "0": {
          "name": "keyword.control.at-rule.keyframes.scss"
        },
        "1": {
          "name": "punctuation.definition.keyword.scss"
        }
      },
      "end": "(?<=})",
      "name": "meta.at-rule.keyframes.scss",
      "patterns": [
        {
          "match": "(?<=@keyframes)\\s+((?:[_A-Za-z][-\\w]|-[_A-Za-z])[-\\w]*)",
          "captures": {
            "1": {
              "name": "entity.name.function.scss"
            }
          }
        },
        {
          "begin": "(?<=@keyframes)\\s+(\")",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.string.begin.scss"
            }
          },
          "end": "\"",
          "endCaptures": {
            "0": {
              "name": "punctuation.definition.string.end.scss"
            }
          },
          "name": "string.quoted.double.scss",
          "contentName": "entity.name.function.scss",
          "patterns": [
            {
              "match": "\\\\(\\h{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "include": "#interpolation"
            }
          ]
        },
        {
          "begin": "(?<=@keyframes)\\s+(')",
          "beginCaptures": {
            "1": {
              "name": "punctuation.definition.string.begin.scss"
            }
          },
          "end": "'",
          "endCaptures": {
            "0": {
              "name": "punctuation.definition.string.end.scss"
            }
          },
          "name": "string.quoted.single.scss",
          "contentName": "entity.name.function.scss",
          "patterns": [
            {
              "match": "\\\\(\\h{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "include": "#interpolation"
            }
          ]
        },
        {
          "begin": "{",
          "beginCaptures": {
            "0": {
              "name": "punctuation.section.keyframes.begin.scss"
            }
          },
          "end": "}",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.keyframes.end.scss"
            }
          },
          "patterns": [
            {
              "match": "\\b(?:(?:100|[1-9]\\d|\\d)%|from|to)(?=\\s*{)",
              "name": "entity.other.attribute-name.scss"
            },
            {
              "include": "#interpolation"
            },
            {
              "include": "#property_list"
            },
            {
              "include": "#rules"
            }
          ]
        }
      ]
    },
    "at_rule_media": {
      "patterns": [
        {
          "begin": "^\\s*((@)media)\\b",
          "beginCaptures": {
            "1": {
              "name": "keyword.control.at-rule.media.scss"
            },
            "2": {
              "name": "punctuation.definition.keyword.scss"
            }
          },
          "end": "\\s*(?={)",
          "name": "meta.at-rule.media.scss",
          "patterns": [
            {
              "include": "#comment_block"
            },
            {
              "include": "#comment_line"
            },
            {
              "match": "\\b(only)\\b",
              "name": "keyword.control.operator.css.scss"
            },
            {
              "begin": "\\(",
              "beginCaptures": {
                "0": {
                  "name": "punctuation.definition.media-query.begin.bracket.round.scss"
                }
              },
              "end": "\\)",
              "endCaptures": {
                "0": {
                  "name": "punctuation.definition.media-query.end.bracket.round.scss"
                }
              },
              "name": "meta.property-list.media-query.scss",
              "patterns": [
                {
                  "begin": "(?<![-a-z])(?=[-a-z])",
                  "end": "$|(?![-a-z])",
                  "name": "meta.property-name.media-query.scss",
                  "patterns": [
                    {
                      "include": "source.css#media-features"
                    },
                    {
                      "include": "source.css#property-names"
                    }
                  ]
                },
                {
                  "begin": "(:)\\s*(?!(\\s*{))",
                  "beginCaptures": {
                    "1": {
                      "name": "punctuation.separator.key-value.scss"
                    }
                  },
                  "end": "\\s*(;|(?=}|\\)))",
                  "endCaptures": {
                    "1": {
                      "name": "punctuation.terminator.rule.scss"
                    }
                  },
                  "contentName": "meta.property-value.media-query.scss",
                  "patterns": [
                    {
                      "include": "#general"
                    },
                    {
                      "include": "#property_values"
                    }
                  ]
                }
              ]
            },
            {
              "include": "#interpolation"
            },
            {
              "include": "#conditional_operators"
            },
            {
              "include": "source.css#media-types"
            }
          ]
        }
      ]
    },
    "at_rule_page": {
      "patterns": [
        {
          "begin": "^\\s*((@)page)(?=:|\\s)\\s*([-:\\w]*)",
          "captures": {
            "1": {
              "name": "keyword.control.at-rule.page.scss"
            },
            "2": {
              "name": "punctuation.definition.keyword.scss"
            },
            "3": {
              "name": "entity.name.function.scss"
            }
          },
          "end": "\\s*(?={)",
          "name": "meta.at-rule.page.scss"
        }
      ]
    },
    "at_rule_supports": {
      "begin": "(?<=^|\\s)(@)supports\\b",
      "captures": {
        "0": {
          "name": "keyword.control.at-rule.supports.scss"
        },
        "1": {
          "name": "punctuation.definition.keyword.scss"
        }
      },
      "end": "(?={)|$",
      "name": "meta.at-rule.supports.scss",
      "patterns": [
        {
          "include": "#logical_operators"
        },
        {
          "include": "#properties"
        },
        {
          "match": "\\(",
          "name": "punctuation.definition.condition.begin.bracket.round.scss"
        },
        {
          "match": "\\)",
          "name": "punctuation.definition.condition.end.bracket.round.scss"
        }
      ]
    },
    "at_rule_custom_single": {
      "begin": "(?i)(?=@[\\w-]+[^;]+;s*$)",
      "end": "(?<=;)(?!\\G)",
      "patterns": [
        {
          "begin": "(?i)\\G(@)[\\w-]+",
          "beginCaptures": {
            "0": {
              "name": "keyword.control.at-rule.css"
            },
            "1": {
              "name": "punctuation.definition.keyword.css"
            }
          },
          "end": ";",
          "endCaptures": {
            "0": {
              "name": "punctuation.terminator.rule.css"
            }
          },
          "name": "meta.at-rule.header.css"
        }
      ]
    },
    "at_rule_custom": {
      "begin": "(?i)(?=@[\\w-]+(\\s|\\(|{|/\\*|$))",
      "end": "(?<=})(?!\\G)",
      "patterns": [
        {
          "begin": "(?i)\\G(@)[\\w-]+",
          "beginCaptures": {
            "0": {
              "name": "keyword.control.at-rule.css"
            },
            "1": {
              "name": "punctuation.definition.keyword.css"
            }
          },
          "end": "(?=\\s*[{;])",
          "name": "meta.at-rule.header.css"
        },
        {
          "begin": "{",
          "beginCaptures": {
            "0": {
              "name": "punctuation.section.begin.bracket.curly.css"
            }
          },
          "end": "}",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.end.bracket.curly.css"
            }
          },
          "name": "meta.at-rule.body.css",
          "patterns": [
            {
              "include": "$self"
            }
          ]
        }
      ]
    },
    "comment_block": {
      "begin": "/\\*",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.comment.scss"
        }
      },
      "end": "\\*/",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.comment.scss"
        }
      },
      "name": "comment.block.scss"
    },
    "comment_line": {
      "begin": "//",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.comment.scss"
        }
      },
      "end": "\\n",
      "name": "comment.line.scss"
    },
    "constant_important": {
      "match": "!important",
      "name": "keyword.other.important.scss"
    },
    "constant_mathematical_symbols": {
      "match": "\\b(\\+|-|\\*|/)\\b",
      "name": "support.constant.mathematical-symbols.scss"
    },
    "functions": {
      "patterns": [
        {
          "begin": "(?i)(?<![\\w-])(calc)(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.calc.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.calc.css",
          "patterns": [
            {
              "match": "[*/]|(?<=\\s|^)[-+](?=\\s|$)",
              "name": "keyword.operator.arithmetic.css"
            },
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "begin": "(?i)(?<![\\w-])(rgba?|hsla?)(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.misc.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.color.css",
          "patterns": [
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "begin": "(?xi) (?<![\\w-])\n(\n  (?:-webkit-|-moz-|-o-)?    # Accept prefixed/historical variants\n  (?:repeating-)?            # \"Repeating\"-type gradient\n  (?:linear|radial|conic)    # Shape\n  -gradient\n)\n(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.gradient.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.gradient.css",
          "patterns": [
            {
              "match": "(?i)(?<![\\w-])(from|to|at)(?![\\w-])",
              "name": "keyword.operator.gradient.css"
            },
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "begin": "(?i)(?<![\\w-])(-webkit-gradient)(\\()",
          "beginCaptures": {
            "1": {
              "name": "invalid.deprecated.gradient.function.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.gradient.invalid.deprecated.gradient.css",
          "patterns": [
            {
              "begin": "(?i)(?<![\\w-])(from|to|color-stop)(\\()",
              "beginCaptures": {
                "1": {
                  "name": "invalid.deprecated.function.css"
                },
                "2": {
                  "name": "punctuation.section.function.begin.bracket.round.css"
                }
              },
              "end": "\\)",
              "endCaptures": {
                "0": {
                  "name": "punctuation.section.function.end.bracket.round.css"
                }
              },
              "patterns": [
                {
                  "include": "#property_values"
                }
              ]
            },
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "begin": "(?xi) (?<![\\w-])\n(annotation|attr|blur|brightness|character-variant|contrast|counters?\n|cross-fade|drop-shadow|element|fit-content|format|grayscale|hue-rotate\n|image-set|invert|local|minmax|opacity|ornaments|repeat|saturate|sepia\n|styleset|stylistic|swash|symbols)\n(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.misc.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.misc.css",
          "patterns": [
            {
              "match": "(?i)(?<=[,\\s\"]|\\*/|^)\\d+x(?=[\\s,\"')]|/\\*|$)",
              "name": "constant.numeric.other.density.css"
            },
            {
              "include": "#property_values"
            },
            {
              "match": "[^'\"),\\s]+",
              "name": "variable.parameter.misc.css"
            }
          ]
        },
        {
          "begin": "(?i)(?<![\\w-])(circle|ellipse|inset|polygon|rect)(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.shape.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.shape.css",
          "patterns": [
            {
              "match": "(?i)(?<=\\s|^|\\*/)(at|round)(?=\\s|/\\*|$)",
              "name": "keyword.operator.shape.css"
            },
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "begin": "(?i)(?<![\\w-])(cubic-bezier|steps)(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.timing-function.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.timing-function.css",
          "patterns": [
            {
              "match": "(?i)(?<![\\w-])(start|end)(?=\\s*\\)|$)",
              "name": "support.constant.step-direction.css"
            },
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "begin": "(?xi) (?<![\\w-])\n( (?:translate|scale|rotate)(?:[XYZ]|3D)?\n| matrix(?:3D)?\n| skew[XY]?\n| perspective\n)\n(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.transform.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "patterns": [
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "include": "#url"
        },
        {
          "begin": "(?i)(?<![\\w-])(var)(\\()",
          "beginCaptures": {
            "1": {
              "name": "support.function.misc.css"
            },
            "2": {
              "name": "punctuation.section.function.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.section.function.end.bracket.round.css"
            }
          },
          "name": "meta.function.variable.css",
          "patterns": [
            {
              "name": "variable.argument.css",
              "match": "(?x)\n--\n(?:[-a-zA-Z_]    | [^\\x00-\\x7F])     # First letter\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F]      # Remainder of identifier\n  |\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*"
            },
            {
              "include": "#property_values"
            }
          ]
        },
        {
          "include": "source.css#url"
        }
      ]
    },
    "function_attributes": {
      "patterns": [
        {
          "match": ":",
          "name": "punctuation.separator.key-value.scss"
        },
        {
          "include": "#general"
        },
        {
          "include": "#property_values"
        },
        {
          "match": "[={}\\?;@]",
          "name": "invalid.illegal.scss"
        }
      ]
    },
    "general": {
      "patterns": [
        {
          "include": "#interpolation"
        },
        {
          "include": "#comment_block"
        },
        {
          "include": "#comment_line"
        }
      ]
    },
    "interpolation": {
      "contentName": "meta.embedded.line.ts",
      "begin": "\\${",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.interpolation.begin.bracket.curly.scss punctuation.definition.template-expression.begin.js"
        }
      },
      "end": "}",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.interpolation.end.bracket.curly.scss punctuation.definition.template-expression.end.js"
        }
      },
      "name": "variable.interpolation.scss",
      "patterns": [
        {
          "include": "source.ts#expression"
        }
      ]
    },
    "conditional_operators": {
      "patterns": [
        {
          "include": "#comparison_operators"
        },
        {
          "include": "#logical_operators"
        }
      ]
    },
    "comparison_operators": {
      "match": "==|!=|<=|>=|<|>",
      "name": "keyword.operator.comparison.scss"
    },
    "logical_operators": {
      "match": "\\b(not|or|and)\\b",
      "name": "keyword.operator.logical.scss"
    },
    "operators": {
      "match": "[-+*/](?!\\s*[-+*/])",
      "name": "keyword.operator.css"
    },
    "properties": {
      "patterns": [
        {
          "begin": "(?<![-a-z])(?=[-a-z])",
          "end": "$|(?![-a-z])",
          "name": "meta.property-name.scss",
          "patterns": [
            {
              "include": "source.css#property-names"
            },
            {
              "include": "source.css#media-features"
            }
          ]
        },
        {
          "include": "#interpolation"
        },
        {
          "begin": "(:)\\s*(?!(\\s*{))",
          "beginCaptures": {
            "1": {
              "name": "punctuation.separator.key-value.scss"
            }
          },
          "end": "\\s*(;|(?=}|\\)))",
          "endCaptures": {
            "1": {
              "name": "punctuation.terminator.rule.scss"
            }
          },
          "contentName": "meta.property-value.scss",
          "patterns": [
            {
              "include": "#general"
            },
            {
              "include": "#property_values"
            }
          ]
        }
      ]
    },
    "property_list": {
      "begin": "{",
      "beginCaptures": {
        "0": {
          "name": "punctuation.section.property-list.begin.bracket.curly.scss"
        }
      },
      "end": "}",
      "endCaptures": {
        "0": {
          "name": "punctuation.section.property-list.end.bracket.curly.scss"
        }
      },
      "name": "meta.property-list.scss",
      "patterns": [
        {
          "include": "#rules"
        },
        {
          "include": "#properties"
        },
        {
          "include": "$self"
        }
      ]
    },
    "property_values": {
      "patterns": [
        {
          "include": "#string_single"
        },
        {
          "include": "#string_double"
        },
        {
          "include": "#functions"
        },
        {
          "include": "#constant_important"
        },
        {
          "include": "source.css#numeric-values"
        },
        {
          "include": "source.css#property-keywords"
        },
        {
          "include": "source.css#color-keywords"
        },
        {
          "include": "source.css#property-names"
        },
        {
          "include": "#constant_mathematical_symbols"
        },
        {
          "begin": "\\(",
          "beginCaptures": {
            "0": {
              "name": "punctuation.definition.begin.bracket.round.scss"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.definition.end.bracket.round.scss"
            }
          },
          "patterns": [
            {
              "include": "#general"
            },
            {
              "include": "#property_values"
            }
          ]
        }
      ]
    },
    "rules": {
      "patterns": [
        {
          "include": "#general"
        },
        {
          "include": "#at_rule_media"
        },
        {
          "include": "#selectors"
        }
      ]
    },
    "selector_attribute": {
      "match": "(?xi)\n(\\[)\n\\s*\n(\n  (?:\n    [-a-zA-Z_0-9]|[^\\x00-\\x7F]       # Valid identifier characters\n    | \\\\(?:[0-9a-fA-F]{1,6}|.)       # Escape sequence\n|\\$\\{[^{}]*\\} # Interpolation\n  )+?\n)\n(?:\n  \\s*([~|^$*]?=)\\s*\n  (?:\n    (\n      (?:\n        [-a-zA-Z_0-9]|[^\\x00-\\x7F]       # Valid identifier characters\n        | \\\\(?:[0-9a-fA-F]{1,6}|.)       # Escape sequence\n|\\$\\{[^{}]*\\} # Interpolation\n      )+\n    )\n    |\n    ((\")(.*?)(\"))\n    |\n    ((')(.*?)('))\n  )\n)?\n\\s*\n(\\])",
      "name": "meta.attribute-selector.scss",
      "captures": {
        "1": {
          "name": "punctuation.definition.attribute-selector.begin.bracket.square.scss"
        },
        "2": {
          "name": "entity.other.attribute-name.attribute.scss",
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.scss"
            }
          ]
        },
        "3": {
          "name": "keyword.operator.scss"
        },
        "4": {
          "name": "string.unquoted.attribute-value.scss",
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.scss"
            }
          ]
        },
        "5": {
          "name": "string.quoted.double.attribute-value.scss"
        },
        "6": {
          "name": "punctuation.definition.string.begin.scss"
        },
        "7": {
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.scss"
            }
          ]
        },
        "8": {
          "name": "punctuation.definition.string.end.scss"
        },
        "9": {
          "name": "string.quoted.single.attribute-value.scss"
        },
        "10": {
          "name": "punctuation.definition.string.begin.scss"
        },
        "11": {
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.scss"
            }
          ]
        },
        "12": {
          "name": "punctuation.definition.string.end.scss"
        },
        "13": {
          "name": "punctuation.definition.attribute-selector.end.bracket.square.scss"
        }
      }
    },
    "selector_class": {
      "match": "(?x)\n(\\.)                                  # Valid class-name\n(\n  (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F]     # Valid identifier characters\n    | \\\\(?:[0-9a-fA-F]{1,6}|.)       # Escape sequence\n|\\$\\{[^{}]*\\} # Interpolation\n  )+\n)                                      # Followed by either:\n(?= $                                  # - End of the line\n  | [\\s,.\\#)\\[:{>+~|]               # - Another selector\n  | /\\*                               # - A block comment\n)",
      "name": "entity.other.attribute-name.class.css",
      "captures": {
        "1": {
          "name": "punctuation.definition.entity.css"
        },
        "2": {
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.scss"
            }
          ]
        }
      }
    },
    "selector_custom": {
      "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,\\[{]|:(link|visited|hover|active|focus|focus-visible|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid|user-invalid)(\\([0-9A-Za-z]*\\))?)",
      "name": "entity.name.tag.custom.scss"
    },
    "selector_id": {
      "match": "(?x)\n(\\#)                                  # Valid id-name\n(\n  (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F]     # Valid identifier characters\n    | \\\\(?:[0-9a-fA-F]{1,6}|.)       # Escape sequence\n|\\$\\{[^{}]*\\} # Interpolation\n  )+\n)                                      # Followed by either:\n(?= $                                  # - End of the line\n  | [\\s,.\\#)\\[:{>+~|]               # - Another selector\n  | /\\*                               # - A block comment\n)",
      "name": "entity.other.attribute-name.id.css",
      "captures": {
        "1": {
          "name": "punctuation.definition.entity.css"
        },
        "2": {
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.identifier.scss"
            }
          ]
        }
      }
    },
    "parent_selector_suffix": {
      "match": "(?x)\n(?<=&)\n(\n  (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F]     # Valid identifier characters\n    | \\\\(?:[0-9a-fA-F]{1,6}|.)       # Escape sequence\n|\\$\\{[^{}]*\\} # Interpolation\n  )+\n)                                      # Followed by either:\n(?= $                                  # - End of the line\n  | [\\s,.\\#)\\[:{>+~|]               # - Another selector\n  | /\\*                               # - A block comment\n)",
      "name": "entity.other.attribute-name.parent-selector-suffix.css",
      "captures": {
        "1": {
          "name": "punctuation.definition.entity.css"
        },
        "2": {
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "\\\\([0-9a-fA-F]{1,6}|.)",
              "name": "constant.character.escape.scss"
            },
            {
              "match": "\\$|}",
              "name": "invalid.illegal.identifier.scss"
            }
          ]
        }
      }
    },
    "selector_pseudo_class": {
      "patterns": [
        {
          "begin": "((:)\\bnth-(?:child|last-child|of-type|last-of-type))(\\()",
          "beginCaptures": {
            "1": {
              "name": "entity.other.attribute-name.pseudo-class.css"
            },
            "2": {
              "name": "punctuation.definition.entity.css"
            },
            "3": {
              "name": "punctuation.definition.pseudo-class.begin.bracket.round.css"
            }
          },
          "end": "\\)",
          "endCaptures": {
            "0": {
              "name": "punctuation.definition.pseudo-class.end.bracket.round.css"
            }
          },
          "patterns": [
            {
              "include": "#interpolation"
            },
            {
              "match": "(?i)[+-]?(\\d+n?|n)(\\s*[+-]\\s*\\d+)?",
              "name": "constant.numeric.css"
            },
            {
              "match": "(?i)even|odd",
              "name": "support.constant.parity.css"
            },
            {
              "match": "(?<=\\d)n\\b|\\b(n|even|odd)\\b",
              "name": "constant.other.scss"
            },
            {
              "match": "\\w+",
              "name": "invalid.illegal.scss"
            }
          ]
        },
        {
          "include": "source.css#pseudo-classes"
        },
        {
          "include": "source.css#pseudo-elements"
        },
        {
          "include": "source.css#functional-pseudo-classes"
        }
      ]
    },
    "selectors": {
      "patterns": [
        {
          "include": "#interpolation"
        },
        {
          "include": "source.css#tag-names"
        },
        {
          "include": "#selector_custom"
        },
        {
          "include": "#selector_class"
        },
        {
          "include": "#selector_id"
        },
        {
          "include": "#selector_pseudo_class"
        },
        {
          "include": "#tag_wildcard"
        },
        {
          "include": "#tag_parent_reference"
        },
        {
          "include": "source.css#pseudo-elements"
        },
        {
          "include": "#selector_attribute"
        },
        {
          "include": "#parent_selector_suffix"
        }
      ]
    },
    "string_double": {
      "begin": "\"",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.string.begin.scss"
        }
      },
      "end": "\"",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.end.scss"
        }
      },
      "name": "string.quoted.double.scss",
      "patterns": [
        {
          "match": "\\\\(\\h{1,6}|.)",
          "name": "constant.character.escape.scss"
        },
        {
          "include": "#interpolation"
        }
      ]
    },
    "string_single": {
      "begin": "'",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.string.begin.scss"
        }
      },
      "end": "'",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.end.scss"
        }
      },
      "name": "string.quoted.single.scss",
      "patterns": [
        {
          "match": "\\\\(\\h{1,6}|.)",
          "name": "constant.character.escape.scss"
        },
        {
          "include": "#interpolation"
        }
      ]
    },
    "tag_parent_reference": {
      "match": "&",
      "name": "entity.name.tag.reference.scss"
    },
    "tag_wildcard": {
      "match": "\\*",
      "name": "entity.name.tag.wildcard.scss"
    }
  },

  "scopeName": "source.css.styled"
}
