Automated Refactoring for Size Reduction of CSS Style Sheets

Marti 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 : Cascading Style Sheets (CSS) is a standard language for stylizing and formatting web documents. Its role in web user experience becomes increasingly important. However, CSS files tend to be designed from a result-driven point of view, without much attention devoted to the CSS file structure as long as it produces the desired results. Furthermore, the rendering intended in the browser is often checked and debugged with a document instance. Style sheets normally apply to a set of documents, therefore modifications added while focusing on a particular instance might affect other documents of the set. We present a first prototype of static CSS semantical analyzer and optimizer that is capable of automatically detecting and removing redundant property declarations and rules. We build on earlier work on tree logics to locate redundancies due to the semantics of selectors and properties. Existing purely syntactic CSS optimizers might be used in conjunction with our tool, for performing complementary (and orthogonal) size reduction, toward the common goal of providing smaller and cleaner CSS files.
Type de document :
Pré-publication, Document de travail
Domaine :
Liste complète des métadonnées

Littérature citée [6 références]  Voir  Masquer  Télécharger
Contributeur : Tyrex Equipe <>
Soumis le : mercredi 9 juillet 2014 - 11:27:22
Dernière modification le : jeudi 11 octobre 2018 - 08:48:04
Document(s) archivé(s) le : jeudi 9 octobre 2014 - 11:54:26


Fichiers produits par l'(les) auteur(s)


  • HAL Id : hal-01021332, version 1



Marti Bosch, Pierre Genevès, Nabil Layaïda. Automated Refactoring for Size Reduction of CSS Style Sheets. 2014. 〈hal-01021332〉



Consultations de la notice


Téléchargements de fichiers