Abstract
Layout for web documents is a complex process described by the lengthy prose Cascading Style Sheets (CSS) specification. It is difficult to ensure that implementations match this specification. We show how an implementation can more closely match the specification by using attribute grammars to define layout computations. Particularly, we show how high-level patterns encode the terminology of the specification, discriminating between elements using the same language as in the specification. We also present a new method of injecting artificial structure into an existing tree using reference attribute grammars. The result is a high-level executable specification for CSS layout that can form the basis for a full declarative implementation.
Original language | English |
---|---|
Title of host publication | SPLASH Companion 2016 |
Subtitle of host publication | Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity |
Editors | Eelco Visser |
Place of Publication | New York, NY |
Publisher | Association for Computing Machinery |
Pages | 29-30 |
Number of pages | 2 |
ISBN (Electronic) | 9781450344371 |
DOIs | |
Publication status | Published - 2016 |
Event | ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications : Software for Humanity - Amsterdam, Netherlands Duration: 30 Oct 2016 → 4 Nov 2016 |
Conference
Conference | ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications : Software for Humanity |
---|---|
City | Amsterdam, Netherlands |
Period | 30/10/16 → 4/11/16 |
Keywords
- Cascading Style Sheets
- attribute grammars
- language specification