Skip to content

Instantly share code, notes, and snippets.

@OMEGAYALFA
Forked from idan/gist:1385165
Created November 17, 2018 18:27
Show Gist options
  • Save OMEGAYALFA/b1995e73e8203ef79caccdfef4f7be95 to your computer and use it in GitHub Desktop.
Save OMEGAYALFA/b1995e73e8203ef79caccdfef4f7be95 to your computer and use it in GitHub Desktop.
rel=logo enhancements
<!--
rel=logo is lovely.
I have a few ideas on making it better. The core idea is great, but if we're
pushing a new thing, we have an opportunity to encourage web developers to
provide more than just a single color logo. All of the ideas below are optional
enhancements for anybody wanting to use rel=logo on their site.
-->
<!-- Encourage developers to provide monochrome renditions of their logo for
reproduction in environments without color. We can do this with rel="logo
monochrome", in much the same way as alternative stylesheets are specified
(https://developer.mozilla.org/en/CSS/Alternative_style_sheets). -->
<link rel="logo"
type="image/svg"
href="http://yourdomain.com/logo.svg"/>
<link rel="logo monochrome"
type="image/svg"
href="http://yourdomain.com/logo_monochrome.svg"/>
<!-- We should be taking advantage of the existing media attribute to give hints
about the intended usage for a given logo. SVGs are great, but Facebook isn't
going to use an SVG as your site's image. Why not supply a PNG, sensibly sized
for the screen, with appropriate media definitions? Any site looking to fetch a
small logo to display can look for this standard link. -->
<link rel="logo"
type="image/svg"
media="screen, print"
href="http://yourdomain.com/logo.svg"/>
<link rel="logo"
type="image/png"
media="screen"
href="http://yourdomain.com/logo_small.png"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment