[site] Fix footer logos not rendering in Safari/WebKit#1471
Open
swseverance wants to merge 2 commits intolit:mainfrom
Open
[site] Fix footer logos not rendering in Safari/WebKit#1471swseverance wants to merge 2 commits intolit:mainfrom
swseverance wants to merge 2 commits intolit:mainfrom
Conversation
…1470 Safari requires a #fragment when referencing external SVGs via <use> — a bare href like logo.svg is not supported. Fixed the Lit footer logo by adding the existing #full fragment to its href. The OpenJS logo has an additional complication: it uses a linearGradient with url() references, which Safari cannot resolve across the <use> shadow tree boundary even with a valid fragment. Replaced lazy-svg with inlineSvg so the SVG becomes part of the host document, where url() resolves correctly.
Stack the OpenJS logo and links vertically on narrow screens and add bottom margin to separate them from the copyright text below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Safari requires a #fragment when referencing external SVGs via
<use>— a bare href like logo.svg is not supported. Fixed the Lit footer logo by adding the existing #full fragment to its href.The OpenJS logo has an additional complication: it uses a linearGradient with url() references, which Safari cannot resolve across the shadow tree boundary even with a valid fragment. Replaced lazy-svg with inlineSvg so the SVG becomes part of the host document, where url() resolves correctly.
After fix is applied (demonstrated in Safari desktop):
Also fixes the layout so the links display properly on mobile devices:
Before:
After:
Resolves #1470