2 var mode
= CodeMirror
.getMode({indentUnit
: 2}, "text/x-scss");
3 function MT(name
) { test
.mode(name
, mode
, Array
.prototype.slice
.call(arguments
, 1), "scss"); }
5 MT('url_with_quotation',
6 "[tag foo] { [property background]:[atom url]([string test.jpg]) }");
8 MT('url_with_double_quotes',
9 "[tag foo] { [property background]:[atom url]([string \"test.jpg\"]) }");
11 MT('url_with_single_quotes',
12 "[tag foo] { [property background]:[atom url]([string \'test.jpg\']) }");
15 "[def @import] [string \"compass/css3\"]");
17 MT('important_keyword',
18 "[tag foo] { [property background]:[atom url]([string \'test.jpg\']) [keyword !important] }");
21 "[variable-2 $blue]:[atom #333]");
23 MT('variable_as_attribute',
24 "[tag foo] { [property color]:[variable-2 $blue] }");
27 "[tag foo] { [property padding]:[number 10px] [number 10] [number 10em] [number 8in] }");
29 MT('number_percentage',
30 "[tag foo] { [property width]:[number 80%] }");
33 "[builtin #hello][qualifier .world]{}");
35 MT('singleline_comment',
36 "[comment // this is a comment]");
38 MT('multiline_comment',
39 "[comment /*foobar*/]");
41 MT('attribute_with_hyphen',
42 "[tag foo] { [property font-size]:[number 10px] }");
44 MT('string_after_attribute',
45 "[tag foo] { [property content]:[string \"::\"] }");
48 "[def @include] [qualifier .mixin]");
51 "[tag p] { [property background]:[keyword red]; }");
53 MT('nested_structure',
54 "[tag p] { [tag a] { [property color]:[keyword red]; } }");
57 "[def @mixin] [tag table-base] {}");
59 MT('number_without_semicolon',
60 "[tag p] {[property width]:[number 12]}",
61 "[tag a] {[property color]:[keyword red];}");
63 MT('atom_in_nested_block',
64 "[tag p] { [tag a] { [property color]:[atom #000]; } }");
66 MT('interpolation_in_property',
67 "[tag foo] { #{[variable-2 $hello]}:[number 2]; }");
69 MT('interpolation_in_selector',
70 "[tag foo]#{[variable-2 $hello]} { [property color]:[atom #000]; }");
72 MT('interpolation_error',
73 "[tag foo]#{[error foo]} { [property color]:[atom #000]; }");
76 "[tag foo] { [property width]:[number 4] [operator /] [number 2] }");
78 MT('nested_structure_with_id_selector',
79 "[tag p] { [builtin #hello] { [property color]:[keyword red]; } }");
82 "[def @mixin] [tag container] (",
83 " [variable-2 $a]: [number 10],",
84 " [variable-2 $b]: [number 10])",
93 MT('indent_parentheses',
95 " [property color]: [variable darken]([variable-2 $blue],",
100 "[variable-2 $name]:",
104 " [property margin]: [number 3px];",