Reasoning with Style
Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 2227-2232.
Abstract
The Cascading Style Sheets (CSS) language constitutes a key component of web applications. It offers a series of sophisticated features to stylize web pages. Its apparent simplicity and power are however counter-balanced by the difficulty of debugging and maintaining style sheets, tasks for which developers still lack appropriate tools. In particular, significant portions of CSS code become either useless or redundant, and tend to accumulate over time. The situation becomes even worse as more complex features are added to the CSS language (e.g. CSS3 powerful selectors). A direct consequence is a waste of CPU that is required to display web pages, as well as the significant amount of useless traffic at web scale. Style sheets are designed to operate on a set of documents (possibly generated). However, existing techniques consist in syntax validators, optimizers and runtime debuggers that operate in one particular document instance. As such, they do not provide guarantees concerning all web pages in CSS refactoring, such as preservation of the formatting. This is partly because they are essentially syntactic and do not take advantage of CSS semantics to detect redundancies. We propose a set of automated refactoring techniques aimed at removing redundant and inaccessible declarations and rules, without affecting the layout of any document to which the style sheet is applied. We implemented a prototype that has been extensively tested with popular web sites (such as Google Sites, CNN, Apple, etc.). We show that significant size reduction can be obtained while preserving the code readability and improving maintainability.
@inproceedings{ijcai2015p315,
title = {Reasoning with Style},
author = {Bosch, Martí and Genevès, Pierre and Layaïda, Nabil},
booktitle = {Proceedings of the Twenty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-15}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {Qiang Yang and Michael Wooldridge},
pages = {2227--2232},
year = {2015},
month = {7},
note = {Main Track},
url = {https://ijcai.org/proceedings/2015/315},
}
TY - CPAPER TI - Reasoning with Style AU - Bosch, Martí AU - Genevès, Pierre AU - Layaïda, Nabil T2 - Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-15 PB - International Joint Conferences on Artificial Intelligence PY - 2015 SP - 2227 EP - 2232 UR - https://ijcai.org/proceedings/2015/315 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: