Skip to content

[DRY] Use SVG to embed the header and footer #36

@waldyrious

Description

@waldyrious

This is the 4th (!!) attempt to fully implement the DRY principle by having the common elements (header and footer) defined in a single file and embedded in all other pages. The three previous attempts were html imports (#4), seamless iframes (#11), and intrinsic sizing (#32).

The first two are apparently out of the question, since in both cases, the spec authors seem adamant about not supporting the "seamless embedding of HTML content" use case. As of September 2017, the third one (specifically the height property) is still not widely supported, so I can't really use it yet.

However, it just occurred to me that I can can include HTML within an SVG file, and then embed the SVG within the host HTML page. If this works, it would not only be a working solution, but also give access to the rich sizing options SVG provides, with the viewBox and preserveAspectRatio attributes in addition to height and width. Could this finally be the solution??

Below are some links that will likely be useful for the implementation:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions