You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inconsistent use of language selector icon & other SVG asset problems #300
I just took a peek at how the language picker icon is implemented on this site and strangely found it amongst the HTML+Liquid in _layouts/menu.html while all the other SVG assets are located in the assets/img directory. The files located in that directory also have problems. For example, the menu-down.svg icon strangely includes a line indicating that Apple owns the copyright to it (view source).
I also discovered that several other optimizations could significantly reduce the size of all these SVGs. Compare this to a manually optimized one i made a while ago for some other project: https://codepen.io/DerekNonGeneric/pen/bGroexG.
We can even take this a step further by minifying the assets and can probably make additional corrections in the process (viewbox of TC39 logo seems off) and we should probably ensure all are following a11y best practices (accessible SVGs).
I'm interested in improving around assets. It would be great to open a PR to lift us up to the first stage, but are you willing to do that? I'd love to see that.
Intentionally left for follow-up so this PR stays small and reviewable:
logo.svgviewBox — a visual inspection didn't reveal an obvious problem; happy to do a separate PR if someone can point at a concrete repro.
Deeper SVG optimization / minification of ecma-logo.svg and logo.svg.
Filling in navigation.language.title for non-Chinese locales' site.json so the new <img alt> (and the existing .menu-link__language-text span) get translated text.
Activity
smorimoto commentedon Apr 19, 2023
I'm interested in improving around assets. It would be great to open a PR to lift us up to the first stage, but are you willing to do that? I'd love to see that.
DerekNonGeneric commentedon Apr 19, 2023
Yeah, will get to it eventually (glad you agree) 😄
0xDevNinja commentedon Apr 26, 2026
Opened #661 which covers a focused subset of this issue:
_layouts/menu.htmlintoassets/img/language.svg, referenced via<img>like the other icons.<!-- Copyright © 2015 Apple Inc. All rights reserved. -->comment and redundant XML preamble fromassets/img/menu-down.svg.Intentionally left for follow-up so this PR stays small and reviewable:
logo.svgviewBox— a visual inspection didn't reveal an obvious problem; happy to do a separate PR if someone can point at a concrete repro.ecma-logo.svgandlogo.svg.navigation.language.titlefor non-Chinese locales'site.jsonso the new<img alt>(and the existing.menu-link__language-textspan) get translated text.