Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/css.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!-- https://www.w3.org/TR/CSS22/syndata.html#tokenization --> | 4 | <!-- https://www.w3.org/TR/CSS22/syndata.html#tokenization --> | ||
5 | <!ENTITY nmstart "[_a-zA-Z]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])"> | 5 | <!ENTITY nmstart "[_a-zA-Z]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])"> | ||
6 | <!ENTITY nmchar "[_a-zA-Z0-9-]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])"> | 6 | <!ENTITY nmchar "[_a-zA-Z0-9-]|(\\[0-9a-fA-F]{1,6})|(\\[^\n\r\f0-9a-fA-F])"> | ||
7 | ]> | 7 | ]> | ||
8 | 8 | | |||
9 | <!-- | 9 | <!-- | ||
10 | 10 | | |||
11 | Kate CSS syntax highlighting definition | 11 | Kate CSS syntax highlighting definition | ||
12 | 12 | | |||
13 | Changelog: | 13 | Changelog: | ||
14 | 14 | | |||
15 | - Version 8, by Jonathan Poelen | ||||
16 | - fix some Operator and Selector Tag highlighting | ||||
17 | | ||||
18 | - Version 7, by Jonathan Poelen | ||||
19 | - fix tag followed by a pseudo-class in a nested rule (@media, ...) | ||||
20 | - fix constraint in a rule | ||||
21 | - fix Kate auto-completion for properties and rules | ||||
22 | - New highlighting categories: Keyword, Operator, Separator Symbol, SpecialChar, Variable, Value Keyword, Color, Number, Unit, Selector Tag | ||||
23 | | ||||
15 | - Version 4, by Guo Yunhe guoyunhebrave@gmail.com | 24 | - Version 4, by Guo Yunhe guoyunhebrave@gmail.com | ||
16 | - Remake for complex CSS syntax, avoid errors | 25 | - Remake for complex CSS syntax, avoid errors | ||
17 | 26 | | |||
18 | - Version 2.13, by Guo Yunhe | 27 | - Version 2.13, by Guo Yunhe | ||
19 | - Add all W3C Work Draft properties | 28 | - Add all W3C Work Draft properties | ||
20 | 29 | | |||
21 | - Version 2.06, by Mte90: | 30 | - Version 2.06, by Mte90: | ||
22 | - CSS3 tag | 31 | - CSS3 tag | ||
23 | 32 | | |||
24 | - Version 2.03, by Milian Wolff: | 33 | - Version 2.03, by Milian Wolff: | ||
25 | - Make it spelling aware | 34 | - Make it spelling aware | ||
26 | 35 | | |||
27 | - Version 2.08, Joseph Wenninger: | 36 | - Version 2.08, Joseph Wenninger: | ||
28 | - CSS3 media queries | 37 | - CSS3 media queries | ||
29 | 38 | | |||
30 | --> | 39 | --> | ||
31 | 40 | | |||
32 | <language name="CSS" version="7" kateversion="5.0" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> | 41 | <language name="CSS" version="8" kateversion="5.0" section="Markup" extensions="*.css" indenter="cstyle" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> | ||
33 | 42 | | |||
34 | <highlighting> | 43 | <highlighting> | ||
35 | <list name="properties"> | 44 | <list name="properties"> | ||
36 | <!-- W3C > Work Draft, from https://www.w3.org/Style/CSS/all-properties --> | 45 | <!-- W3C > Work Draft, from https://www.w3.org/Style/CSS/all-properties --> | ||
37 | <item>align-content</item> | 46 | <item>align-content</item> | ||
38 | <item>align-items</item> | 47 | <item>align-items</item> | ||
39 | <item>alignment-baseline</item> | 48 | <item>alignment-baseline</item> | ||
40 | <item>align-self</item> | 49 | <item>align-self</item> | ||
▲ Show 20 Lines • Show All 1284 Lines • ▼ Show 20 Line(s) | 1333 | <list name="@keyframes"> | |||
1325 | <item>@keyframes</item> | 1334 | <item>@keyframes</item> | ||
1326 | </list> | 1335 | </list> | ||
1327 | 1336 | | |||
1328 | <list name="within-@keyframes"> | 1337 | <list name="within-@keyframes"> | ||
1329 | <item>from</item> | 1338 | <item>from</item> | ||
1330 | <item>to</item> | 1339 | <item>to</item> | ||
1331 | </list> | 1340 | </list> | ||
1332 | 1341 | | |||
1333 | <list name="keywords"> | 1342 | <list name="media operators"> | ||
1334 | <item>and</item> | 1343 | <item>and</item> | ||
1335 | <item>or</item> | 1344 | <item>only</item> | ||
1345 | <item>not</item> | ||||
1336 | </list> | 1346 | </list> | ||
1337 | 1347 | | |||
1338 | <contexts> | 1348 | <contexts> | ||
1339 | <context name="Base" attribute="Selector Tag" lineEndContext="#stay"> | 1349 | <context name="Base" attribute="Normal Text" lineEndContext="#stay"> | ||
1340 | <DetectSpaces attribute="Normal Text" /> | 1350 | <DetectSpaces /> | ||
1341 | <IncludeRules context="FindComments" /> | 1351 | <IncludeRules context="FindComments" /> | ||
1342 | <DetectChar attribute="Normal Text" context="RuleSet" char="{" beginRegion="ruleset" /> | 1352 | <DetectChar attribute="Normal Text" context="RuleSet" char="{" beginRegion="ruleset" /> | ||
1343 | <DetectChar attribute="At Rule" context="SelectAtRule" char="@" lookAhead="true" /> | 1353 | <DetectChar attribute="At Rule" context="SelectAtRule" char="@" lookAhead="true" /> | ||
1344 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | 1354 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | ||
1345 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo" char=":" /> | 1355 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudo" char=":" /> | ||
1346 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | 1356 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | ||
1357 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||||
1358 | <AnyChar attribute="Operator" context="#stay" String="*>+~|" /> | ||||
1347 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | 1359 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | ||
1348 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | 1360 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | ||
1361 | <RegExpr attribute="Selector Tag" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||||
1362 | </context> | ||||
1363 | | ||||
1364 | <context name="FindSelector" attribute="Normal Text" lineEndContext="#stay"> | ||||
1365 | <IncludeRules context="FindComments" /> | ||||
1366 | <!-- find selectors // .class #id :hover :nth-child(2n+1) [type="search"] --> | ||||
1367 | <DetectChar attribute="Selector Attribute" context="SelectorAttr" char="[" /> | ||||
1349 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | 1368 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||
1350 | <AnyChar attribute="Operator" context="#stay" String="*>+~|" /> | 1369 | <AnyChar attribute="Operator" context="#stay" String="*>+~|" /> | ||
1351 | <DetectIdentifier /> | 1370 | <RegExpr attribute="Selector Id" context="#stay" String="#[-]?(&nmstart;)(&nmchar;)*" /> | ||
1371 | <RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" /> | ||||
1372 | <RegExpr attribute="Selector Tag" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||||
1352 | </context> | 1373 | </context> | ||
1353 | 1374 | | |||
1354 | <!-- find functions // rgba(255,255,255,0.75) --> | 1375 | <!-- find functions // rgba(255,255,255,0.75) --> | ||
1355 | <context name="FindFunctions" attribute="Normal Text" lineEndContext="#stay"> | 1376 | <context name="FindFunctions" attribute="Normal Text" lineEndContext="#stay"> | ||
1356 | <RegExpr attribute="Function" context="Function" String="[a-z\-]{2,}\(" lookAhead="true" /> | 1377 | <RegExpr attribute="Function" context="Function" String="[a-z\-]{2,}\(" lookAhead="true" /> | ||
1357 | </context> | 1378 | </context> | ||
1358 | 1379 | | |||
1359 | <!-- find values // 10px 12pt 2.5em 1rem 75% #ffcc99 red solid --> | 1380 | <!-- find values // 10px 12pt 2.5em 1rem 75% #ffcc99 red solid --> | ||
1360 | <context name="FindValues" attribute="Normal Text" lineEndContext="#stay"> | 1381 | <context name="FindValues" attribute="Normal Text" lineEndContext="#stay"> | ||
1361 | <RegExpr attribute="Annotation" context="#stay" String="!important\b" /> | 1382 | <DetectChar attribute="Annotation" context="Annotation" char="!" /> | ||
1362 | <keyword attribute="Value Keyword" context="#stay" String="value keywords" /> | 1383 | <keyword attribute="Value Keyword" context="#stay" String="value keywords" /> | ||
1363 | <keyword attribute="Value" context="#stay" String="values" /> | 1384 | <keyword attribute="Value" context="#stay" String="values" /> | ||
1364 | <keyword attribute="Color" context="#stay" String="colors" /> | 1385 | <keyword attribute="Color" context="#stay" String="colors" /> | ||
1365 | <RegExpr attribute="Color" context="#stay" String="#([0-9A-Fa-f]{3}){1,2}\b" /> | 1386 | <RegExpr attribute="Color" context="#stay" String="#([0-9A-Fa-f]{3}){1,2}\b" /> | ||
1366 | <RegExpr attribute="Number" context="FindUnits" String="[-+]?[0-9.]+(?![-+])" /> | 1387 | <RegExpr attribute="Number" context="FindUnits" String="[-+]?[0-9.]+(?![-+])" /> | ||
1367 | <RegExpr attribute="Normal Text" context="#stay" String="[\w][\w\-]*|-[\w-]+" /> | 1388 | <RegExpr attribute="Normal Text" context="#stay" String="[-]?(&nmstart;)(&nmchar;)*" /> | ||
1389 | </context> | ||||
1390 | | ||||
1391 | <context name="Annotation" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||||
1392 | <WordDetect attribute="Annotation" context="#pop" String="important" /> | ||||
1368 | </context> | 1393 | </context> | ||
1369 | 1394 | | |||
1370 | <context name="FindUnits" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | 1395 | <context name="FindUnits" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> | ||
1371 | <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)(?![-+])" /> | 1396 | <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)(?![-+])" /> | ||
1372 | </context> | 1397 | </context> | ||
1373 | 1398 | | |||
1374 | <!-- find strings // "some words" 'some words' --> | 1399 | <!-- find strings // "some words" 'some words' --> | ||
1375 | <context name="FindStrings" attribute="Normal Text" lineEndContext="#stay"> | 1400 | <context name="FindStrings" attribute="Normal Text" lineEndContext="#stay"> | ||
1376 | <DetectChar attribute="String" context="StringDQ" char=""" /> | 1401 | <DetectChar attribute="String" context="StringDQ" char=""" /> | ||
1377 | <DetectChar attribute="String" context="StringSQ" char="'" /> | 1402 | <DetectChar attribute="String" context="StringSQ" char="'" /> | ||
1378 | </context> | 1403 | </context> | ||
1379 | 1404 | | |||
1380 | <!-- find comments // /* comment */ --> | 1405 | <!-- find comments // /* comment */ --> | ||
1381 | <context name="FindComments" attribute="Normal Text" lineEndContext="#stay"> | 1406 | <context name="FindComments" attribute="Normal Text" lineEndContext="#stay"> | ||
1382 | <Detect2Chars attribute="Comment" context="IsComments" char="/" char1="*" lookAhead="true"/> | 1407 | <Detect2Chars attribute="Comment" context="IsComments" char="/" char1="*" lookAhead="true"/> | ||
1408 | <Detect2Chars attribute="Error" context="Error" char="/" char1="/" /> | ||||
1409 | </context> | ||||
1410 | | ||||
1411 | <context name="Error" attribute="Error" lineEndContext="#pop"> | ||||
1412 | <RegExpr attribute="Error" context="#pop" String=".*" /> | ||||
1383 | </context> | 1413 | </context> | ||
1384 | 1414 | | |||
1385 | <context name="IsComments" attribute="Normal Text" lineEndContext="#stay"> | 1415 | <context name="IsComments" attribute="Normal Text" lineEndContext="#stay"> | ||
1386 | <RegExpr attribute="Region Marker" context="#pop" String="/\*BEGIN.*\*/" beginRegion="UserDefined" /> | 1416 | <RegExpr attribute="Region Marker" context="#pop" String="/\*\s*BEGIN\b.*\*/" beginRegion="UserDefined" /> | ||
1387 | <RegExpr attribute="Region Marker" context="#pop" String="/\*END.*\*/" endRegion="UserDefined" /> | 1417 | <RegExpr attribute="Region Marker" context="#pop" String="/\*\s*END\b.*\*/" endRegion="UserDefined" /> | ||
1388 | <Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" beginRegion="comment" /> | 1418 | <Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" beginRegion="comment" /> | ||
1389 | </context> | 1419 | </context> | ||
1390 | 1420 | | |||
1391 | <context name="SelectAtRule" attribute="At Rule" lineEndContext="#pop"> | 1421 | <context name="SelectAtRule" attribute="At Rule" lineEndContext="#pop"> | ||
1392 | <keyword attribute="At Rule" context="#pop!NestedAtRule" String="nested at-rules" /> | 1422 | <keyword attribute="At Rule" context="#pop!NestedAtRule" String="nested at-rules" /> | ||
1393 | <keyword attribute="At Rule" context="#pop!AtRule" String="at-rules" /> | 1423 | <keyword attribute="At Rule" context="#pop!AtRule" String="at-rules" /> | ||
1394 | <keyword attribute="At Rule" context="#pop!@keyframes" String="@keyframes" /> | 1424 | <keyword attribute="At Rule" context="#pop!@keyframes" String="@keyframes" /> | ||
1395 | <keyword attribute="At Rule" context="#pop!@viewport" String="@viewport" /> | 1425 | <keyword attribute="At Rule" context="#pop!@viewport" String="@viewport" /> | ||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | |||||
1464 | </context> | 1494 | </context> | ||
1465 | 1495 | | |||
1466 | <context name="NestedAtRule" attribute="Normal Text" lineEndContext="#stay"> | 1496 | <context name="NestedAtRule" attribute="Normal Text" lineEndContext="#stay"> | ||
1467 | <DetectSpaces /> | 1497 | <DetectSpaces /> | ||
1468 | <DetectChar attribute="Normal Text" context="NestedBase" char="{" beginRegion="ruleset" /> | 1498 | <DetectChar attribute="Normal Text" context="NestedBase" char="{" beginRegion="ruleset" /> | ||
1469 | <IncludeRules context="AtRuleValue" /> | 1499 | <IncludeRules context="AtRuleValue" /> | ||
1470 | </context> | 1500 | </context> | ||
1471 | 1501 | | |||
1472 | <context name="NestedBase" attribute="Selector Tag" lineEndContext="#stay"> | 1502 | <context name="NestedBase" attribute="Normal Text" lineEndContext="#stay"> | ||
1473 | <DetectSpaces attribute="Normal Text" /> | 1503 | <DetectSpaces /> | ||
1474 | <DetectChar attribute="Normal Text" context="#pop#pop" char="}" endRegion="ruleset" /> | 1504 | <DetectChar attribute="Normal Text" context="#pop#pop" char="}" endRegion="ruleset" /> | ||
1475 | <IncludeRules context="Base" /> | 1505 | <IncludeRules context="Base" /> | ||
1476 | </context> | 1506 | </context> | ||
1477 | 1507 | | |||
1478 | <context name="AtRule" attribute="Normal Text" lineEndContext="#pop"> | 1508 | <context name="AtRule" attribute="Normal Text" lineEndContext="#pop"> | ||
1479 | <DetectSpaces /> | 1509 | <DetectSpaces /> | ||
1480 | <DetectChar attribute="Separator Symbol" context="#pop" char=";" /> | 1510 | <DetectChar attribute="Separator Symbol" context="#pop" char=";" /> | ||
1481 | <IncludeRules context="AtRuleValue" /> | 1511 | <IncludeRules context="AtRuleValue" /> | ||
1482 | </context> | 1512 | </context> | ||
1483 | 1513 | | |||
1484 | <context name="UnknownAtRule" attribute="Normal Text" lineEndContext="#pop"> | 1514 | <context name="UnknownAtRule" attribute="Normal Text" lineEndContext="#stay"> | ||
1485 | <DetectSpaces /> | 1515 | <DetectSpaces /> | ||
1486 | <DetectChar attribute="Separator Symbol" context="#pop" char=";" /> | 1516 | <DetectChar attribute="Separator Symbol" context="#pop" char=";" /> | ||
1487 | <DetectChar attribute="Normal Text" context="#pop!RuleSet" char="{" beginRegion="ruleset" /> | 1517 | <DetectChar attribute="Normal Text" context="#pop!RuleSet" char="{" beginRegion="ruleset" /> | ||
1518 | <DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="ruleset" /> | ||||
1488 | <IncludeRules context="AtRuleValue" /> | 1519 | <IncludeRules context="AtRuleValue" /> | ||
1489 | </context> | 1520 | </context> | ||
1490 | 1521 | | |||
1491 | <context name="AtRuleValue" attribute="Normal Text" lineEndContext="#stay"> | 1522 | <context name="AtRuleValue" attribute="Normal Text" lineEndContext="#stay"> | ||
1492 | <IncludeRules context="FindComments" /> | 1523 | <IncludeRules context="FindComments" /> | ||
1493 | <IncludeRules context="FindStrings" /> | 1524 | <IncludeRules context="FindStrings" /> | ||
1494 | <IncludeRules context="FindFunctions" /> | 1525 | <IncludeRules context="FindFunctions" /> | ||
1495 | <keyword attribute="Keyword" context="#stay" String="keywords" /> | 1526 | <keyword attribute="Keyword" context="#stay" String="media operators" /> | ||
1496 | <RegExpr attribute="Property" context="#stay" String="[A-Za-z_-]+(?=\s*:)" /> | 1527 | <RegExpr attribute="Property" context="#stay" String="[A-Za-z_-]+(?=\s*:)" /> | ||
1497 | <keyword attribute="Value" context="#stay" String="medias" /> | 1528 | <keyword attribute="Value" context="#stay" String="medias" /> | ||
1498 | <IncludeRules context="FindValues" /> | 1529 | <IncludeRules context="FindValues" /> | ||
1499 | </context> | 1530 | </context> | ||
1500 | 1531 | | |||
1501 | <context name="SelectorAttr" attribute="Selector Attribute" lineEndContext="#stay"> | 1532 | <context name="SelectorAttr" attribute="Selector Attribute" lineEndContext="#stay"> | ||
1502 | <DetectChar attribute="Selector Attribute" context="#pop" char="]" /> | 1533 | <DetectChar attribute="Selector Attribute" context="#pop" char="]" /> | ||
1503 | <IncludeRules context="FindStrings" /> | 1534 | <IncludeRules context="FindStrings" /> | ||
Show All 22 Lines | 1556 | <context name="SelectorPseudoElements" attribute="Selector Pseudo" lineEndContext="#pop#pop"> | |||
1526 | <keyword attribute="Selector Pseudo" context="#pop!SelectorPseudoValue" String="pseudoelements" /> | 1557 | <keyword attribute="Selector Pseudo" context="#pop!SelectorPseudoValue" String="pseudoelements" /> | ||
1527 | <RegExpr attribute="Selector Pseudo" context="#pop!SelectorPseudoValue" String="[-a-zA-Z][-a-zA-Z0-9]*" /> | 1558 | <RegExpr attribute="Selector Pseudo" context="#pop!SelectorPseudoValue" String="[-a-zA-Z][-a-zA-Z0-9]*" /> | ||
1528 | </context> | 1559 | </context> | ||
1529 | 1560 | | |||
1530 | <context name="SelectorPseudoValueSelector" attribute="Selector Pseudo" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> | 1561 | <context name="SelectorPseudoValueSelector" attribute="Selector Pseudo" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> | ||
1531 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoValueCloseSelector" char="(" /> | 1562 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoValueCloseSelector" char="(" /> | ||
1532 | </context> | 1563 | </context> | ||
1533 | 1564 | | |||
1534 | <context name="SelectorPseudoValueCloseSelector" attribute="Selector Tag" lineEndContext="#stay"> | 1565 | <context name="SelectorPseudoValueCloseSelector" attribute="Normal Text" lineEndContext="#stay"> | ||
1566 | <DetectSpaces /> | ||||
1535 | <DetectChar attribute="Selector Pseudo" context="#pop#pop#pop" char=")" /> | 1567 | <DetectChar attribute="Selector Pseudo" context="#pop#pop#pop" char=")" /> | ||
1536 | <DetectChar attribute="Error" context="#pop#pop#pop!RuleSet" char="{" beginRegion="ruleset" /> | 1568 | <DetectChar attribute="Error" context="#pop#pop#pop!RuleSet" char="{" beginRegion="ruleset" /> | ||
1537 | <IncludeRules context="Base" /> | 1569 | <IncludeRules context="FindSelector" /> | ||
1538 | </context> | 1570 | </context> | ||
1539 | 1571 | | |||
1540 | <context name="SelectorPseudoValue" attribute="Selector Pseudo" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> | 1572 | <context name="SelectorPseudoValue" attribute="Selector Pseudo" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop"> | ||
1541 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoValueClose" char="(" /> | 1573 | <DetectChar attribute="Selector Pseudo" context="SelectorPseudoValueClose" char="(" /> | ||
1542 | </context> | 1574 | </context> | ||
1543 | 1575 | | |||
1544 | <context name="SelectorPseudoValueClose" attribute="Selector Pseudo" lineEndContext="#pop#pop#pop"> | 1576 | <context name="SelectorPseudoValueClose" attribute="Selector Pseudo" lineEndContext="#pop#pop#pop"> | ||
1545 | <DetectChar attribute="Selector Pseudo" context="#pop#pop#pop" char=")" /> | 1577 | <DetectChar attribute="Selector Pseudo" context="#pop#pop#pop" char=")" /> | ||
1546 | <DetectIdentifier /> | 1578 | <DetectIdentifier /> | ||
1547 | </context> | 1579 | </context> | ||
1548 | 1580 | | |||
1549 | <context name="Comment" attribute="Comment" lineEndContext="#stay"> | 1581 | <context name="Comment" attribute="Comment" lineEndContext="#stay"> | ||
1550 | <DetectSpaces /> | 1582 | <DetectSpaces /> | ||
1551 | <Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" endRegion="comment" /> | 1583 | <Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" endRegion="comment" /> | ||
1552 | <IncludeRules context="##Alerts" /> | 1584 | <IncludeRules context="##Alerts" /> | ||
1585 | <DetectIdentifier /> | ||||
1553 | </context> | 1586 | </context> | ||
1554 | 1587 | | |||
1555 | <context name="RuleSet" attribute="Normal Text" lineEndContext="#stay"> | 1588 | <context name="RuleSet" attribute="Normal Text" lineEndContext="#stay"> | ||
1556 | <DetectSpaces /> | 1589 | <DetectSpaces /> | ||
1557 | <DetectChar attribute="Normal Text" context="RuleSet" char="{" beginRegion="ruleset" /> | | |||
1558 | <DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="ruleset" /> | 1590 | <DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="ruleset" /> | ||
1559 | <RegExpr attribute="Property" context="Rule" String="[A-Za-z_-]+(?=\s*:)" lookAhead="true" /> | 1591 | <RegExpr attribute="Property" context="Rule" String="[A-Za-z_-]+(?=\s*:)" lookAhead="true" /> | ||
1592 | <IncludeRules context="Base" /> | ||||
1593 | <RegExpr attribute="Normal Text" context="#stay" String="[A-Za-z_-]+" /> | ||||
1560 | <!-- auto-completion only, includes by previous rule --> | 1594 | <!-- auto-completion only, includes by previous rule --> | ||
1561 | <keyword attribute="Normal Text" context="#stay" String="properties" /> | 1595 | <keyword attribute="Normal Text" context="#stay" String="properties" /> | ||
1562 | <IncludeRules context="Base" /> | | |||
1563 | </context> | 1596 | </context> | ||
1564 | 1597 | | |||
1565 | <context name="Rule" attribute="Normal Text" lineEndContext="#stay"> | 1598 | <context name="Rule" attribute="Normal Text" lineEndContext="#stay"> | ||
1566 | <DetectChar attribute="Normal Text" context="RuleParameters" char=":" /> | 1599 | <DetectChar attribute="Normal Text" context="RuleParameters" char=":" /> | ||
1567 | <Detect2Chars attribute="Variable" context="IsVariable" char="-" char1="-" /> | 1600 | <Detect2Chars attribute="Variable" context="IsVariable" char="-" char1="-" /> | ||
1568 | <keyword attribute="Property" context="#stay" String="properties" /> | 1601 | <keyword attribute="Property" context="#stay" String="properties" /> | ||
1569 | <RegExpr attribute="Unknown Property" context="#stay" String="[^:]+" /> | 1602 | <RegExpr attribute="Unknown Property" context="#stay" String="[^:]+" /> | ||
1570 | </context> | 1603 | </context> | ||
1571 | 1604 | | |||
1572 | <context name="IsVariable" attribute="Normal Text" lineEndContext="#pop"> | 1605 | <context name="IsVariable" attribute="Normal Text" lineEndContext="#pop"> | ||
1573 | <DetectChar attribute="Normal Text" context="#pop!RuleParameters" char=":" /> | 1606 | <DetectChar attribute="Normal Text" context="#pop!RuleParameters" char=":" /> | ||
1574 | <RegExpr attribute="Variable" context="#stay" String="[^:]+" /> | 1607 | <RegExpr attribute="Variable" context="#stay" String="[^:]+" /> | ||
1575 | </context> | 1608 | </context> | ||
1576 | 1609 | | |||
1577 | <context name="RuleParameters" attribute="Normal Text" lineEndContext="#stay"> | 1610 | <context name="RuleParameters" attribute="Normal Text" lineEndContext="#stay"> | ||
1578 | <DetectSpaces /> | 1611 | <DetectSpaces /> | ||
1579 | <IncludeRules context="FindComments" /> | 1612 | <IncludeRules context="FindComments" /> | ||
1580 | <IncludeRules context="FindStrings" /> | 1613 | <IncludeRules context="FindStrings" /> | ||
1581 | <IncludeRules context="FindFunctions" /> | 1614 | <IncludeRules context="FindFunctions" /> | ||
1582 | <IncludeRules context="FindValues" /> | 1615 | <IncludeRules context="FindValues" /> | ||
1583 | <!-- Jump out conditions --> | 1616 | <!-- Jump out conditions --> | ||
1584 | <DetectChar attribute="Separator Symbol" context="#pop#pop" char=";" /> | 1617 | <DetectChar attribute="Separator Symbol" context="#pop#pop" char=";" /> | ||
1585 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | 1618 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||
1586 | <DetectChar attribute="Normal Text" context="#pop#pop#pop" char="}" endRegion="ruleset" /> | 1619 | <DetectChar attribute="Normal Text" context="#pop#pop#pop" char="}" endRegion="ruleset" /> | ||
1587 | <DetectIdentifier /> | | |||
1588 | <!-- auto-completion only --> | 1620 | <!-- auto-completion only --> | ||
1589 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | 1621 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||
1590 | </context> | 1622 | </context> | ||
1591 | 1623 | | |||
1592 | <context name="Function" attribute="Normal Text" lineEndContext="#stay"> | 1624 | <context name="Function" attribute="Normal Text" lineEndContext="#stay"> | ||
1593 | <DetectChar attribute="Function" context="FunctionParameters" char="(" /> | 1625 | <DetectChar attribute="Function" context="FunctionParameters" char="(" /> | ||
1594 | <StringDetect attribute="Function" context="FunctionVar" String="var(" /> | 1626 | <StringDetect attribute="Function" context="FunctionVar" String="var(" /> | ||
1595 | <StringDetect attribute="Function" context="FunctionUrl" String="url(" /> | 1627 | <StringDetect attribute="Function" context="FunctionUrl" String="url(" /> | ||
Show All 22 Lines | |||||
1618 | <context name="Calc" attribute="Normal Text" lineEndContext="#stay"> | 1650 | <context name="Calc" attribute="Normal Text" lineEndContext="#stay"> | ||
1619 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | 1651 | <DetectChar attribute="Separator Symbol" context="#stay" char="," /> | ||
1620 | <DetectChar attribute="Normal Text" context="NestedCalc" char="(" /> | 1652 | <DetectChar attribute="Normal Text" context="NestedCalc" char="(" /> | ||
1621 | <IncludeRules context="FindComments" /> | 1653 | <IncludeRules context="FindComments" /> | ||
1622 | <IncludeRules context="FindStrings" /> | 1654 | <IncludeRules context="FindStrings" /> | ||
1623 | <IncludeRules context="FindFunctions" /> | 1655 | <IncludeRules context="FindFunctions" /> | ||
1624 | <IncludeRules context="FindValues" /> | 1656 | <IncludeRules context="FindValues" /> | ||
1625 | <RegExpr attribute="Operator" context="#stay" String="[-](?=$|[ \t(,;])|[+](?=$|[^0-9)])|[/*]" /> | 1657 | <RegExpr attribute="Operator" context="#stay" String="[-](?=$|[ \t(,;])|[+](?=$|[^0-9)])|[/*]" /> | ||
1658 | <!-- auto-completion only --> | ||||
1659 | <keyword attribute="Normal Text" context="#stay" String="functions" /> | ||||
1626 | </context> | 1660 | </context> | ||
1627 | 1661 | | |||
1628 | <context name="FunctionUrl" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="UrlValue"> | 1662 | <context name="FunctionUrl" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="UrlValue"> | ||
1629 | <DetectSpaces /> | 1663 | <DetectSpaces /> | ||
1630 | <IncludeRules context="FindStrings" /> | 1664 | <IncludeRules context="FindStrings" /> | ||
1631 | <DetectChar attribute="Function" context="#pop#pop" char=")" /> | 1665 | <DetectChar attribute="Function" context="#pop#pop" char=")" /> | ||
1632 | </context> | 1666 | </context> | ||
1633 | 1667 | | |||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |