Reasoning with Style

Martí Bosch 1 Pierre Genevès 1 Nabil Layaïda 1
1 TYREX - Types and Reasoning for the Web
Inria Grenoble - Rhône-Alpes, LIG - Laboratoire d'Informatique de Grenoble
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 counterbalanced 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.
Type de document :
Communication dans un congrès
International Joint Conference On Artificial Intelligence (IJCAI 2015), Jul 2015, Buenos Aires, Argentina
Liste complète des métadonnées


https://hal.inria.fr/hal-01149248
Contributeur : Tyrex Equipe <>
Soumis le : mercredi 6 mai 2015 - 16:53:53
Dernière modification le : mercredi 14 décembre 2016 - 01:12:50
Document(s) archivé(s) le : mercredi 19 avril 2017 - 18:26:26

Fichier

ReasoningWithStyle-ijcai15.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01149248, version 1

Collections

Citation

Martí Bosch, Pierre Genevès, Nabil Layaïda. Reasoning with Style. International Joint Conference On Artificial Intelligence (IJCAI 2015), Jul 2015, Buenos Aires, Argentina. <hal-01149248>

Partager

Métriques

Consultations de
la notice

334

Téléchargements du document

169