DocumentCode :
2442993
Title :
Automated analysis of CSS rules to support style maintenance
Author :
Mesbah, Ali ; Mirshokraie, Shabnam
Author_Institution :
Univ. of British Columbia, Vancouver, BC, Canada
fYear :
2012
fDate :
2-9 June 2012
Firstpage :
408
Lastpage :
418
Abstract :
CSS is a widely used language for describing the presentation semantics of HTML elements on the web. The language has a number of characteristics, such as inheritance and cascading order, which makes maintaining CSS code a challenging task for web developers. As a result, it is common for unused rules to be accumulated over time. Despite these challenges, CSS analysis has not received much attention from the research community. We propose an automated technique to support styling code maintenance, which (1) analyzes the runtime relationship between the CSS rules and DOM elements of a given web application (2) detects unmatched and ineffective selectors, overridden declaration properties, and undefined class values. Our technique, implemented in an open source tool called Cilla, has a high precision and recall rate. The results of our case study, conducted on fifteen open source and industrial web-based systems, show an average of 60% unused CSS selectors in deployed applications, which points to the ubiquity of the problem.
Keywords :
Internet; hypermedia markup languages; public domain software; software maintenance; CSS rule automated analysis; Cilla; DOM elements; HTML elements presentation semantics; Web application; Web developers; cascading order; cascading style sheets; document object model; industrial Web-based systems; ineffective selector detection; inheritance order; open source tool; overridden declaration properties; style code maintenance; undefined class values; unmatched selector detection; Browsers; Cascading style sheets; Color; HTML; Layout; Maintenance engineering; Runtime; CSS; Cascading style sheets; dynamic analysis; software maintenance; web applications;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
Software Engineering (ICSE), 2012 34th International Conference on
Conference_Location :
Zurich
ISSN :
0270-5257
Print_ISBN :
978-1-4673-1066-6
Electronic_ISBN :
0270-5257
Type :
conf
DOI :
10.1109/ICSE.2012.6227174
Filename :
6227174
Link To Document :
بازگشت