def setUp(self): less = '''@var: red; #page { @var: white; #header { color: @var; // white } }''' self.parsed = Rules(code=less) parse(less=less, parent=self.parsed)
def setUp(self): self.css = '''@font-face { font-family: 'Cantarell'; font-style: normal; font-weight: normal; src: local('Cantarell'), \ url('http://themes.googleusercontent.com/font?kit=tGao7ZPoloMxQHxq-2oxNA') \ format('truetype'); }''' self.parsed = Rules(code=self.css) parse(less=self.css, parent=self.parsed)
def setUp(self): less = ''' @constant: 10px; * { @constant: 20px; a { @constant: 30px; } }''' self.parsed = Rules(code=less) parse(less=less, parent=self.parsed)
def setUp(self): self.css = '@import url("fancyfonts.css") screen;' self.parsed = Rules(code=self.css) parse(less=self.css, parent=self.parsed)
def setUp(self): self.css = '@media screen { }' self.parsed = Rules(code=self.css) parse(less=self.css, parent=self.parsed)
def setUp(self): self.css = '@import "test_file" screen;' self.parsed = Rules(code=self.css) parse(less=self.css, parent=self.parsed)
def parse_less(self, less): parent = Rules(code=less) parse(less=less, parent=parent)