예제 #1
0
        public void Variables2()
        {
            VSHost.ReadyingSolution();

            string input    = "div.item { color: $bg; $bg: blue; }";
            string expected = "div.item {$bg: blue;color: $bg;}";

            string result = _sorter.SortScss(input);

            Assert.AreEqual(expected, result);
        }
예제 #2
0
        public void Mixin2()
        {
            VSHost.ReadyingSolution();

            string input    = "div.item { top: 10px; position: relative; .mixin(@red, 5px); display: block; }";
            string expected = "div.item {position: relative;top: 10px;display: block;.mixin(@red, 5px);}";

            string result = _sorter.SortScss(input);

            Assert.AreEqual(expected, result);
        }
예제 #3
0
        public void Nesting1()
        {
            VSHost.ReadyingSolution();

            string input    = "div.item { top: 10px; position: relative; div{color:red; top: 5px;}}";
            string expected = "div.item {position: relative;top: 10px; div{top: 5px;color:red;}}";

            string result = _sorter.SortScss(input);

            Assert.AreEqual(expected, result);
        }
예제 #4
0
        public void Mixin1()
        {
            VSHost.ReadyingSolution();

            string input    = "div.item { top: 10px; position: relative; .mixin(); }";
            string expected = "div.item {position: relative;top: 10px;.mixin();}";

            string result = _sorter.SortLess(input);

            Assert.AreEqual(expected, result);
        }