The aim of this thesis is to research the differences between the CSS preprocessor languages, namely Less and Sass, and find applicable transformation methods to implement a converter between their dynamic stylesheet formats. A general introduction to the concept of CSS preprocessors is provided first, which is followed by a thorough description of the Less and Sass language features. In addition to this, all the discovered differences are stated and illustrative examples of the invented conversion methods are provided in this work. This is followed by the description of the design and implementation of the proposed converter. As a part of the contribution of this thesis, a CSS comparison tool based on abstract syntax tree transformation has also been developed. Its design is described along the testing procedure used to verify the invented conversion methods. The last part of the work summarizes the achieved results and the future directions of the converter.
LESS and SASS are two dynamic style sheet languages with some minor differences. The goal of this thesis is to create a converter application between these formats.
There are some converters available on the Internet, but all of them are working on the search and replace principle and can not produce 100% correct conversion.
- Study the syntactical differences between LESS and SASS
- Implement an AST parser for both languages
- Study the implementational differences between LESS and SASS
- Implement a code generator for both languages
- Verify the correctness of the converter by writing automated tests