Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/scss.xml
Show All 28 Lines | |||||
29 | - Css3 Tag | 29 | - Css3 Tag | ||
30 | 30 | | |||
31 | - Version 1.2.03.1, by Tijn Schuurmans | 31 | - Version 1.2.03.1, by Tijn Schuurmans | ||
32 | - Added basic support for "@include mixin();" | 32 | - Added basic support for "@include mixin();" | ||
33 | - Clean the indentation to use 4 spaces everywhere | 33 | - Clean the indentation to use 4 spaces everywhere | ||
34 | 34 | | |||
35 | --> | 35 | --> | ||
36 | 36 | | |||
37 | <language name="SCSS" version="9" kateversion="5.53" section="Markup" extensions="*.scss" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> | 37 | <language name="SCSS" version="10" kateversion="5.53" section="Markup" extensions="*.scss" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> | ||
38 | 38 | | |||
39 | <highlighting> | 39 | <highlighting> | ||
40 | <list name="properties"> | 40 | <list name="properties"> | ||
41 | <include>properties##CSS</include> | 41 | <include>properties##CSS</include> | ||
42 | </list> | 42 | </list> | ||
43 | 43 | | |||
44 | <list name="sub-properties"> | 44 | <list name="sub-properties"> | ||
45 | <item>adjust</item> | 45 | <item>adjust</item> | ||
▲ Show 20 Lines • Show All 488 Lines • ▼ Show 20 Line(s) | 526 | <context name="Base" attribute="Normal Text" lineEndContext="#stay"> | |||
534 | <DetectChar attribute="Operator" context="IsSelectors" char="&" /> | 534 | <DetectChar attribute="Operator" context="IsSelectors" char="&" /> | ||
535 | <AnyChar attribute="Operator" context="IsSelectors" String="*>+~|" /> | 535 | <AnyChar attribute="Operator" context="IsSelectors" String="*>+~|" /> | ||
536 | <RegExpr attribute="Selector Pseudo" context="SelectorPseudo" String=":(?=[a-z:])" /> | 536 | <RegExpr attribute="Selector Pseudo" context="SelectorPseudo" String=":(?=[a-z:])" /> | ||
537 | <RegExpr attribute="Selector Id" context="IsSelectors" String="#[-]?(&nmstart;)(&nmchar;)*" /> | 537 | <RegExpr attribute="Selector Id" context="IsSelectors" String="#[-]?(&nmstart;)(&nmchar;)*" /> | ||
538 | <RegExpr attribute="Selector Class" context="IsSelectors" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | 538 | <RegExpr attribute="Selector Class" context="IsSelectors" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | ||
539 | <RegExpr attribute="Placeholder Selector" context="IsSelectors" String="%[_a-zA-Z][_a-zA-Z\-]*" /> | 539 | <RegExpr attribute="Placeholder Selector" context="IsSelectors" String="%[_a-zA-Z][_a-zA-Z\-]*" /> | ||
540 | <RegExpr attribute="Selector Tag" context="IsSelectors" String="[-]?(&nmstart;)(&nmchar;)*(?=\s|:?[\s#.&{[*>+~|,]|:[a-z:])" /> | 540 | <RegExpr attribute="Selector Tag" context="IsSelectors" String="[-]?(&nmstart;)(&nmchar;)*(?=\s|:?[\s#.&{[*>+~|,]|:[a-z:])" /> | ||
541 | <RegExpr attribute="Variable" context="VariableDefine" String="\$[a-zA-Z0-9\-_]+(?=\s*:)" /> | 541 | <RegExpr attribute="Variable" context="VariableDefine" String="\$[a-zA-Z0-9\-_]+(?=\s*:)" /> | ||
542 | <RegExpr attribute="Variable" context="Interpolation" String="#\{\s*\$[a-zA-Z0-9\-_]+" /> | 542 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||
543 | </context> | 543 | </context> | ||
544 | 544 | | |||
545 | <context name="IsSelectors" attribute="Normal Text" lineEndContext="#stay"> | 545 | <context name="IsSelectors" attribute="Normal Text" lineEndContext="#stay"> | ||
546 | <DetectSpaces /> | 546 | <DetectSpaces /> | ||
547 | <DetectChar attribute="Normal Text" context="#pop!RuleSet" char="{" beginRegion="ruleset" /> | 547 | <DetectChar attribute="Normal Text" context="#pop!RuleSet" char="{" beginRegion="ruleset" /> | ||
548 | <DetectChar attribute="At Rule" context="#pop!SelectAtRule" char="@" lookAhead="true" /> | 548 | <DetectChar attribute="At Rule" context="#pop!SelectAtRule" char="@" lookAhead="true" /> | ||
549 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | 549 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||
550 | <DetectChar attribute="Error" context="#pop" char=";" /> | 550 | <DetectChar attribute="Error" context="#pop" char=";" /> | ||
Show All 11 Lines | 561 | <context name="SelectorTypes" attribute="Normal Text" lineEndContext="#stay"> | |||
562 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | 562 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | ||
563 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo" char=":" /> | 563 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo" char=":" /> | ||
564 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | 564 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | ||
565 | <IncludeRules context="FindComments" /> | 565 | <IncludeRules context="FindComments" /> | ||
566 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | 566 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | ||
567 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | 567 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | ||
568 | <RegExpr attribute="Placeholder Selector" context="#stay" String="%[_a-zA-Z][_a-zA-Z\-]*" /> | 568 | <RegExpr attribute="Placeholder Selector" context="#stay" String="%[_a-zA-Z][_a-zA-Z\-]*" /> | ||
569 | <RegExpr attribute="Selector Tag" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | 569 | <RegExpr attribute="Selector Tag" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||
570 | <RegExpr attribute="Variable" context="Interpolation" String="#\{\s*\$[a-zA-Z0-9\-_]+" /> | 570 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||
571 | </context> | 571 | </context> | ||
572 | 572 | | |||
573 | <context name="VariableDefine" attribute="Normal Text" lineEndContext="#stay"> | 573 | <context name="VariableDefine" attribute="Normal Text" lineEndContext="#stay"> | ||
574 | <DetectChar attribute="Normal Text" context="RuleParameters" char=":" /> | 574 | <DetectChar attribute="Normal Text" context="RuleParameters" char=":" /> | ||
575 | </context> | 575 | </context> | ||
576 | 576 | | |||
577 | <context name="Interpolation" attribute="Variable" lineEndContext="#stay"> | 577 | <context name="Interpolation" attribute="Normal Text" lineEndContext="#stay"> | ||
578 | <DetectSpaces /> | 578 | <DetectSpaces /> | ||
579 | <DetectChar attribute="Variable" context="#pop" char="}" /> | 579 | <DetectChar attribute="Interpolation" context="#pop" char="}" /> | ||
580 | <IncludeRules context="FindStrings" /> | ||||
581 | <IncludeRules context="FindFunctions" /> | ||||
582 | <IncludeRules context="FindValues" /> | ||||
583 | <!-- auto-completion only --> | ||||
584 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
580 | </context> | 585 | </context> | ||
581 | 586 | | |||
582 | 587 | | |||
583 | <!-- find functions // rgba(255,255,255,0.75) --> | 588 | <!-- find functions // rgba(255,255,255,0.75) --> | ||
584 | <context name="FindFunctions" attribute="Normal Text" lineEndContext="#stay"> | 589 | <context name="FindFunctions" attribute="Normal Text" lineEndContext="#stay"> | ||
585 | <RegExpr attribute="Function" context="Function" String="[a-z\-]{2,}\(" lookAhead="true" /> | 590 | <RegExpr attribute="Function" context="Function" String="[a-z\-]{2,}\(" lookAhead="true" /> | ||
586 | </context> | 591 | </context> | ||
587 | 592 | | |||
588 | <!-- find values // 10px 12pt 2.5em 1rem 75% #ffcc99 red solid --> | 593 | <!-- find values // 10px 12pt 2.5em 1rem 75% #ffcc99 red solid --> | ||
589 | <context name="FindValues" attribute="Normal Text" lineEndContext="#stay"> | 594 | <context name="FindValues" attribute="Normal Text" lineEndContext="#stay"> | ||
590 | <DetectChar attribute="Annotation" context="Annotation" char="!" /> | 595 | <DetectChar attribute="Annotation" context="Annotation" char="!" /> | ||
591 | <keyword attribute="Operator" context="#stay" String="operators" /> | 596 | <keyword attribute="Operator" context="#stay" String="operators" /> | ||
592 | <keyword attribute="Value Keyword" context="#stay" String="value keywords" /> | 597 | <keyword attribute="Value Keyword" context="#stay" String="value keywords" /> | ||
593 | <keyword attribute="Value" context="#stay" String="values" /> | 598 | <keyword attribute="Value" context="#stay" String="values" /> | ||
594 | <keyword attribute="Color" context="#stay" String="colors" /> | 599 | <keyword attribute="Color" context="#stay" String="colors" /> | ||
595 | <RegExpr attribute="Number" context="FindUnits" String="[0-9.]+" /> | 600 | <RegExpr attribute="Number" context="FindUnits" String="[0-9.]+" /> | ||
596 | <RegExpr attribute="Color" context="#stay" String="#([0-9A-Fa-f]{3}){1,2}\b" /> | 601 | <RegExpr attribute="Color" context="#stay" String="#([0-9A-Fa-f]{3}){1,2}\b" /> | ||
597 | <RegExpr attribute="Variable" context="Interpolation" String="#\{\s*\$[a-zA-Z0-9\-_]+" /> | | |||
598 | <RegExpr attribute="Variable" context="#stay" String="\$[a-zA-Z0-9\-_]+" /> | 602 | <RegExpr attribute="Variable" context="#stay" String="\$[a-zA-Z0-9\-_]+" /> | ||
599 | <RegExpr attribute="Normal Text" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | 603 | <RegExpr attribute="Normal Text" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||
600 | <AnyChar attribute="Operator" context="#stay" String="*/+%-" /> | 604 | <AnyChar attribute="Operator" context="#stay" String="*/+%-" /> | ||
605 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||||
601 | </context> | 606 | </context> | ||
602 | 607 | | |||
603 | <context name="Annotation" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | 608 | <context name="Annotation" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
604 | <keyword attribute="Annotation" context="#pop" String="annotations" /> | 609 | <keyword attribute="Annotation" context="#pop" String="annotations" /> | ||
605 | </context> | 610 | </context> | ||
606 | 611 | | |||
607 | <context name="FindUnits" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | 612 | <context name="FindUnits" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
608 | <RegExpr attribute="Unit" context="#stay" String="(%|(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz)\b)" /> | 613 | <RegExpr attribute="Unit" context="#stay" String="(%|(em|ex|ch|rem|vw|vh|vm|px|in|cm|mm|pt|pc|deg|rad|grad|turn|ms|s|Hz|kHz)\b)" /> | ||
▲ Show 20 Lines • Show All 275 Lines • ▼ Show 20 Line(s) | |||||
884 | </context> | 889 | </context> | ||
885 | 890 | | |||
886 | <context name="SubRule" attribute="Normal Text" lineEndContext="#stay"> | 891 | <context name="SubRule" attribute="Normal Text" lineEndContext="#stay"> | ||
887 | <DetectSpaces /> | 892 | <DetectSpaces /> | ||
888 | <IncludeRules context="FindComments" /> | 893 | <IncludeRules context="FindComments" /> | ||
889 | <DetectChar attribute="Normal Text" context="#pop#pop#pop" char="}" endRegion="ruleset" /> | 894 | <DetectChar attribute="Normal Text" context="#pop#pop#pop" char="}" endRegion="ruleset" /> | ||
890 | <RegExpr attribute="Property" context="IsProperty" String="[A-Za-z_-]+(?=\s*:)" /> | 895 | <RegExpr attribute="Property" context="IsProperty" String="[A-Za-z_-]+(?=\s*:)" /> | ||
891 | <RegExpr attribute="Variable" context="VariableDefine" String="\$[a-zA-Z0-9\-_]+(?=\s*:)" /> | 896 | <RegExpr attribute="Variable" context="VariableDefine" String="\$[a-zA-Z0-9\-_]+(?=\s*:)" /> | ||
892 | <RegExpr attribute="Variable" context="Interpolation" String="#\{\s*\$[a-zA-Z0-9\-_]+" /> | 897 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||
893 | <DetectIdentifier /> | 898 | <DetectIdentifier /> | ||
894 | <AnyChar attribute="Error" context="#stay" String="*>+~|.#" /> | 899 | <AnyChar attribute="Error" context="#stay" String="*>+~|.#" /> | ||
895 | <!-- auto-completion only, includes by previous rule --> | 900 | <!-- auto-completion only, includes by previous rule --> | ||
896 | <keyword attribute="Normal Text" context="#stay" String="properties" /> | 901 | <keyword attribute="Normal Text" context="#stay" String="properties" /> | ||
897 | <keyword attribute="Normal Text" context="#stay" String="sub-properties" /> | 902 | <keyword attribute="Normal Text" context="#stay" String="sub-properties" /> | ||
898 | </context> | 903 | </context> | ||
899 | 904 | | |||
900 | <context name="Function" attribute="Normal Text" lineEndContext="#stay"> | 905 | <context name="Function" attribute="Normal Text" lineEndContext="#stay"> | ||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | |||||
962 | </context> | 967 | </context> | ||
963 | 968 | | |||
964 | <context name="StringSQ" attribute="String" lineEndContext="#stay"> | 969 | <context name="StringSQ" attribute="String" lineEndContext="#stay"> | ||
965 | <DetectChar attribute="String" context="#pop" char="'" /> | 970 | <DetectChar attribute="String" context="#pop" char="'" /> | ||
966 | <IncludeRules context="InsideString" /> | 971 | <IncludeRules context="InsideString" /> | ||
967 | </context> | 972 | </context> | ||
968 | 973 | | |||
969 | <context name="InsideString" attribute="String" lineEndContext="#stay"> | 974 | <context name="InsideString" attribute="String" lineEndContext="#stay"> | ||
970 | <Detect2Chars attribute="SpecialChar" context="InterpolationString" char="#" char1="{" /> | 975 | <Detect2Chars attribute="Interpolation" context="Interpolation" char="#" char1="{" /> | ||
971 | <RegExpr attribute="SpecialChar" context="#stay" String="\\([0-9A-Fa-f]{1,6}|.?)" /> | 976 | <RegExpr attribute="SpecialChar" context="#stay" String="\\([0-9A-Fa-f]{1,6}|.?)" /> | ||
972 | <RegExpr attribute="String" context="#stay" String="\\?[^"'\\]+" /> | 977 | <RegExpr attribute="String" context="#stay" String="\\?[^#"'\\]+" /> | ||
973 | </context> | | |||
974 | | ||||
975 | <context name="InterpolationString" attribute="String" lineEndContext="#stay"> | | |||
976 | <DetectChar attribute="SpecialChar" context="#pop" char="}" /> | | |||
977 | <IncludeRules context="FindStrings" /> | | |||
978 | <IncludeRules context="FindFunctions" /> | | |||
979 | <IncludeRules context="FindValues" /> | | |||
980 | <!-- auto-completion only --> | | |||
981 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | | |||
982 | </context> | 978 | </context> | ||
983 | 979 | | |||
984 | </contexts> | 980 | </contexts> | ||
985 | 981 | | |||
986 | <itemDatas> | 982 | <itemDatas> | ||
987 | <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> | 983 | <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> | ||
988 | <itemData name="At Rule" defStyleNum="dsImport" spellChecking="false"/> | 984 | <itemData name="At Rule" defStyleNum="dsImport" spellChecking="false"/> | ||
989 | <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> | 985 | <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> | ||
990 | <itemData name="Property" defStyleNum="dsKeyword" spellChecking="false"/> | 986 | <itemData name="Property" defStyleNum="dsKeyword" spellChecking="false"/> | ||
991 | <itemData name="Unknown Property" defStyleNum="dsNormal" spellChecking="false"/> | 987 | <itemData name="Unknown Property" defStyleNum="dsNormal" spellChecking="false"/> | ||
992 | <itemData name="String" defStyleNum="dsString"/> | 988 | <itemData name="String" defStyleNum="dsString"/> | ||
993 | <itemData name="SpecialChar" defStyleNum="dsSpecialChar" spellChecking="false"/> | 989 | <itemData name="SpecialChar" defStyleNum="dsSpecialChar" spellChecking="false"/> | ||
990 | <itemData name="Interpolation" defStyleNum="dsOperator" spellChecking="false"/> | ||||
994 | <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/> | 991 | <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/> | ||
995 | <itemData name="Separator Symbol" defStyleNum="dsOperator" spellChecking="false"/> | 992 | <itemData name="Separator Symbol" defStyleNum="dsOperator" spellChecking="false"/> | ||
996 | <itemData name="Value" defStyleNum="dsDecVal" spellChecking="false"/> | 993 | <itemData name="Value" defStyleNum="dsDecVal" spellChecking="false"/> | ||
997 | <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/> | 994 | <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/> | ||
998 | <itemData name="Value Keyword" defStyleNum="dsBuiltIn" spellChecking="false"/> | 995 | <itemData name="Value Keyword" defStyleNum="dsBuiltIn" spellChecking="false"/> | ||
999 | <itemData name="Color" defStyleNum="dsConstant" spellChecking="false"/> | 996 | <itemData name="Color" defStyleNum="dsConstant" spellChecking="false"/> | ||
1000 | <itemData name="Unit" defStyleNum="dsDataType" spellChecking="false"/> | 997 | <itemData name="Unit" defStyleNum="dsDataType" spellChecking="false"/> | ||
1001 | <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/> | 998 | <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/> | ||
Show All 22 Lines |