site/node_modules/shiki/dist/langs/css.mjs

9 lines
51 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "CSS", "name": "css", "patterns": [{ "include": "#comment-block" }, { "include": "#escapes" }, { "include": "#combinators" }, { "include": "#selector" }, { "include": "#at-rules" }, { "include": "#rule-list" }], "repository": { "at-rules": { "patterns": [{ "begin": "\\A(?:\\xEF\\xBB\\xBF)?(?i:(?=\\s*@charset\\b))", "end": ";|(?=$)", "endCaptures": { "0": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.at-rule.charset.css", "patterns": [{ "captures": { "1": { "name": "invalid.illegal.not-lowercase.charset.css" }, "2": { "name": "invalid.illegal.leading-whitespace.charset.css" }, "3": { "name": "invalid.illegal.no-whitespace.charset.css" }, "4": { "name": "invalid.illegal.whitespace.charset.css" }, "5": { "name": "invalid.illegal.not-double-quoted.charset.css" }, "6": { "name": "invalid.illegal.unclosed-string.charset.css" }, "7": { "name": "invalid.illegal.unexpected-characters.charset.css" } }, "match": '(?x)\n\\G\n((?!@charset)@\\w+)\n|\n\\G(\\s+)\n|\n(@charset\\S[^;]*)\n|\n(?<=@charset)\n(\\x20{2,}|\\t+)\n|\n(?<=@charset\\x20)\n([^";]+)\n|\n("[^"]+$)\n|\n(?<=")\n([^;]+)' }, { "captures": { "1": { "name": "keyword.control.at-rule.charset.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "match": "((@)charset)(?=\\s)" }, { "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": '"|$', "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.double.css", "patterns": [{ "begin": '(?:\\G|^)(?=(?:[^"])+$)', "end": "$", "name": "invalid.illegal.unclosed.string.css" }] }] }, { "begin": `(?i)((@)import)(?:\\s+|$|(?=['"]|/\\*))`, "beginCaptures": { "1": { "name": "keyword.control.at-rule.import.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "end": ";", "endCaptures": { "0": { "name": "punctuation.terminator.rule.css" } }, "name": "meta.at-rule.import.css", "patterns": [{ "begin": "\\G\\s*(?=/\\*)", "end": "(?<=\\*/)\\s*", "patterns": [{ "include": "#comment-block" }] }, { "include": "#string" }, { "include": "#url" }, { "include": "#media-query-list" }] }, { "begin": "(?i)((@)font-face)(?=\\s*|{|/\\*|$)", "beginCaptures": { "1": { "name": "keyword.control.at-rule.font-face.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "end": "(?!\\G)", "name": "meta.at-rule.font-face.css", "patterns": [{ "include": "#comment-block" }, { "include": "#escapes" }, { "include": "#rule-list" }] }, { "begin": "(?i)(@)page(?=[\\s:{]|/\\*|$)", "captures": { "0": { "name": "keyword.control.at-rule.page.css" }, "1": { "name": "punctuation.definition.keyword.css" } }, "end": "(?=\\s*($|[:{;]))", "name": "meta.at-rule.page.css", "patterns": [{ "include": "#rule-list" }] }, { "begin": "(?i)(?=@media(\\s|\\(|/\\*|$))", "end": "(?<=})(?!\\G)", "patterns": [{ "begin": "(?i)\\G(@)media", "beginCaptures": { "0": { "name": "keyword.control.at-rule.media.css" }, "1": { "name": "punctuation.definition.keyword.css" } }, "end": "(?=\\s*[{;])", "name": "meta.at-rule.media.header.css", "patterns": [{ "include": "#media-query-list" }] }, { "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.media.begin.bracket.curly.css" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.media.end.bracket.curly.css" } }, "name": "meta.at-rule.media.body.css", "patterns": [{ "include": "$self" }] }] }, { "begin": `(?i)(?=@counter-style([\\s'"{;]|/\\*|$))`, "end": "(?<=})(?!\\G)", "patterns": [{ "begin": "(?i)\\G(@)counter-style", "beginCaptures": { "0": { "name": "keyword.control.at-rule.counter-style.css" }, "1": { "name": "punctuation.definition.keyword.css" } }, "end": "(?=\\s*{)", "name": "meta.at-rule.counter-style.header.css", "patterns": [{ "include": "#comment-block" }, { "include": "#escapes" }, { "captures": { "0": { "patterns": [{ "include": "#escapes" }] } }, "match": "(?x)\n(?:[-a-zA-Z_] | [^\\x00-\\x7F])\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F]\n|\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", "name": "variable.parameter.style-name.css" }] }, { "begin": "{", "
((@)(annotation|character-variant|ornaments|styleset|stylistic|swash))
(?=[\\s@'"{;]|/\\*|$)`, "beginCaptures": { "1": { "name": "keyword.control.at-rule.${3:/downcase}.css" }, "2": { "name": "punctuation.definition.keyword.css" } }, "end": "(?<=})", "name": "meta.at-rule.${3:/downcase}.css", "patterns": [{ "begin": "{", "beginCaptures": { "0": { "name": "punctuation.section.property-list.begin.bracket.curly.css" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.property-list.end.bracket.curly.css" } }, "name": "meta.property-list.font-feature.css", "patterns": [{ "captures": { "0": { "patterns": [{ "include": "#escapes" }] } }, "match": "(?x)\n(?: [-a-zA-Z_] | [^\\x00-\\x7F] )\n(?: [-a-zA-Z0-9_] | [^\\x00-\\x7F]\n| \\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", "name": "variable.font-feature.css" }, { "include": "#rule-list-innards" }] }] }, "functional-pseudo-classes": { "patterns": [{ "begin": "(?i)((:)dir)(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.section.function.begin.bracket.round.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.end.bracket.round.css" } }, "patterns": [{ "include": "#comment-block" }, { "include": "#escapes" }, { "match": "(?i)(?<![\\w-])(ltr|rtl)(?![\\w-])", "name": "support.constant.text-direction.css" }, { "include": "#property-values" }] }, { "begin": "(?i)((:)lang)(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.section.function.begin.bracket.round.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.end.bracket.round.css" } }, "patterns": [{ "match": "(?<=[(,\\s])[a-zA-Z]+(-[a-zA-Z0-9]*|\\\\(?:[0-9a-fA-F]{1,6}|.))*(?=[),\\s])", "name": "support.constant.language-range.css" }, { "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.double.css", "patterns": [{ "include": "#escapes" }, { "match": '(?<=["\\s])[a-zA-Z*]+(-[a-zA-Z0-9*]*)*(?=["\\s])', "name": "support.constant.language-range.css" }] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.css" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.css" } }, "name": "string.quoted.single.css", "patterns": [{ "include": "#escapes" }, { "match": "(?<=['\\s])[a-zA-Z*]+(-[a-zA-Z0-9*]*)*(?=['\\s])", "name": "support.constant.language-range.css" }] }, { "include": "#commas" }] }, { "begin": "(?i)((:)(?:not|has|matches|where|is))(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.section.function.begin.bracket.round.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.end.bracket.round.css" } }, "patterns": [{ "include": "#selector-innards" }] }, { "begin": "(?i)((:)nth-(?:last-)?(?:child|of-type))(\\()", "beginCaptures": { "1": { "name": "entity.other.attribute-name.pseudo-class.css" }, "2": { "name": "punctuation.definition.entity.css" }, "3": { "name": "punctuation.section.function.begin.bracket.round.css" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.function.end.bracket.round.css" } }, "patterns": [{ "match": "(?i)[+-]?(\\d+n?|n)(\\s*[+-]\\s*\\d+)?", "name": "constant.numeric.css" }, { "match": "(?i)even|odd", "name": "support.constant.parity.css" }] }] }, "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.arithmeti
var css = [
lang
];
export { css as default };