3 <script src=
"../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"syntax-highlight.js"></script>
9 function dumpSyntaxHighlightSCSS(str
)
11 return InspectorTest
.dumpSyntaxHighlight(str
, "text/x-scss");
14 dumpSyntaxHighlightSCSS("a[href='/']");
15 dumpSyntaxHighlightSCSS("#content > a:hover");
16 dumpSyntaxHighlightSCSS("@import url(style.css);");
17 dumpSyntaxHighlightSCSS("@import url(\"style.css\") projection, tv;");
18 dumpSyntaxHighlightSCSS("@import \"/css/fireball_unicode.css\"; html {}");
19 dumpSyntaxHighlightSCSS("@media screen { body { color: red; } }");
20 dumpSyntaxHighlightSCSS("@font-face { font-family: \"MyHelvetica\"; }");
21 dumpSyntaxHighlightSCSS("p { color: color; red: red; color: #000; color: #FFF; color: #123AbC; color: #faebfe; color:papayawhip; }");
22 dumpSyntaxHighlightSCSS("p { margin: -10px !important; }");
23 dumpSyntaxHighlightSCSS("$margin-left: $offsetBefore + 12px + $offsetAfter;");
24 dumpSyntaxHighlightSCSS("$type: monster;\n" +
26 "@if $type == ocean {\n" +
28 "} @else if $type == matador {\n" +
30 "} @else if $type == monster {\n" +
36 dumpSyntaxHighlightSCSS("@for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; } }");
37 dumpSyntaxHighlightSCSS(
38 "@mixin adjust-location($x, $y) {\n" +
39 "@if unitless($x) {\n" +
40 "@warn \"Assuming #{$x} to be in pixels\";\n" +
43 "position: relative; left: $x; top: $y;\n" +
46 dumpSyntaxHighlightSCSS(
48 "$navbar-width: 800px;\n" +
50 "$navbar-color: #ce4dd6;\n" +
52 "width: $navbar-width;\n" +
53 "border-bottom: 2px solid $navbar-color;\n" +
56 "@extend .notice !optional;\n" +
58 "width: $navbar-width/$items - 10px;\n" +
59 "background-color: lighten($navbar-color, 20%);\n" +
61 "background-color: lighten($navbar-color, 10%);\n" +
66 .then(InspectorTest
.completeTest
.bind(InspectorTest
));
72 <body onload=
"runTest()">
74 Tests that (S)CSS syntax highlighter properly detects the tokens.