Migrating Cascading Style Sheets to Preprocessors by Introducing Mixins. Mazinanian, D. & Tsantalis, N. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, pages 672–683, New York, NY, USA, 2016. ACM. Invited to Special Issue of the Automated Software Engineering Journal
Migrating Cascading Style Sheets to Preprocessors by Introducing Mixins [pdf]Paper  Migrating Cascading Style Sheets to Preprocessors by Introducing Mixins [link]Link  doi  abstract   bibtex   
Cascading Style Sheets (CSS) is the standard language for styling web documents and is extensively used in the industry. However, CSS lacks constructs that would allow code reuse (e.g., functions). Consequently, maintaining CSS code is often a cumbersome and error-prone task. Preprocessors (e.g., Less and Sass) have been introduced to fill this gap, by extending CSS with the missing constructs. Despite the clear maintainability benefits coming from the use of prepro-cessors, there is currently no support for migrating legacy CSS code to preprocessors. In this paper, we propose a technique for automatically detecting duplicated style declarations in CSS code that can be migrated to preproces-sor functions (i.e., mixins). Our technique can parameter-ize differences in the style values of duplicated declarations, and ensure that the migration will not change the presentation semantics of the web documents. The evaluation has shown that our technique is able to detect 98% of the mix-ins that professional developers introduced in websites and Style Sheet libraries, and can safely migrate real CSS code.
@inproceedings{Mazinanian:ASE:2016,
	author = {Mazinanian, Davood and Tsantalis, Nikolaos},
	title = {Migrating Cascading Style Sheets to Preprocessors by Introducing Mixins},
	booktitle = {Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering},
	--series = {ASE 2016},
	year = {2016},
	isbn = {978-1-4503-3845-5},
	location = {Singapore, Singapore},
	pages = {672--683},
	numpages = {12},
	--url = {http://doi.acm.org/10.1145/2970276.2970348},
	doi = {10.1145/2970276.2970348},
	acmid = {2970348},
	publisher = {ACM},
	address = {New York, NY, USA},
	keywords = {Cascading style sheets, duplication, migration, refactoring},
	url_Paper = {publications/ASE_2016.pdf},
	url_link = {http://dmazinanian.me/publications/ASE'16/},
	abstract = {Cascading Style Sheets (CSS) is the standard language for styling web documents and is extensively used in the industry. However, CSS lacks constructs that would allow code reuse (e.g., functions). Consequently, maintaining CSS code is often a cumbersome and error-prone task. Preprocessors (e.g., Less and Sass) have been introduced to fill this gap, by extending CSS with the missing constructs. Despite the clear maintainability benefits coming from the use of prepro-cessors, there is currently no support for migrating legacy CSS code to preprocessors. In this paper, we propose a technique for automatically detecting duplicated style declarations in CSS code that can be migrated to preproces-sor functions (i.e., mixins). Our technique can parameter-ize differences in the style values of duplicated declarations, and ensure that the migration will not change the presentation semantics of the web documents. The evaluation has shown that our technique is able to detect 98% of the mix-ins that professional developers introduced in websites and Style Sheet libraries, and can safely migrate real CSS code.},
	bibbase_note = {<span style="color: blue"><strong>Invited to Special Issue of the Automated Software Engineering Journal</strong></span>},
}
Downloads: 0