Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Due to XML headings, SVG files cause invalid HTML on pages where theirs contents get {% include %}d #22

Open
strogonoff opened this issue Jul 27, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@strogonoff
Copy link
Contributor

strogonoff commented Jul 27, 2018

Background

For site appearance to be in line with the design model we’re working with, designers/maintainers would’ve had to provide multiple logo variants for projects & hub. E.g., one variant would be the “main” colored one, one would be for top navigation header where logo is typically all-white on color, perhaps one would be for footer, etc.

Including shapes from SVG files right into HTML, on the other hand, enables logo appearance to be customized via CSS in limited ways (such as changing fills to certain color), while all that’s needed from logo designer is a single SVG file with a logo, dropped in a certain directory.

It also saves a few HTTP(S) requests by inlining some well-compressable additional markup within page contents, although this isn’t an important consideration as static assets would likely be cached anyway.

Thus, embedding SVG using Jekyll/Liquid {% include %} is used sometimes to make symbol appearance changeable via CSS.

Bug

This does not cause browsers to fail rendering the page, but it is likely invalid markup anyway.

screen shot 2018-07-13 at 6 58 26 pm

I believe the <?xml…> heading is highlighted in red because browsers do not anticipate that as part of HTML document body.

Could be resolved with a simple SVGs pre-processing step at Jekyll build stage.

@strogonoff strogonoff added the bug Something isn't working label Jul 27, 2018
@strogonoff strogonoff self-assigned this Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant