-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
figure out Markdown story for Retina badges #34
Comments
Unfortunately GitHub's markdown engine doesn't appear to be open source any longer, so we can't just submit a pull request. |
BitBucket uses Python Markdown and they use safe mode so as to not output HTML. Python Markdown does not appear to support image dimensions. P.S. could we retitle this issue to emphasis that it's for Retina badges. |
I updated the title. Feel free to retitle again, @olivierlacan. :-) |
Fyi, what was Even if Markdown could specify a height, do we really want the height specified on every single badge out there? It gives us Retina but we're stuck at that height forever. |
Rather than specifying a fixed height, there is a new option in Safari/Chrome and coming to Firefox by the end of the year. <img src="low-res.jpg" srcset="high-res.jpg 2x"> We still would need it in hoedown (and really, in the GitHub implementation) as well as Python Markdown (and BitBucket), and wherever else people use shields. OR, people just add an HTML img tag directly into their markdown, so long as it isn't escaped. On GitHub: becomes <p><a href="low-res.jpg" target="_blank"><img src="low-res.jpg" style="max-width:100%;"></a></p> 😢 Reference: At long last, browser makers adapt to Retina-quality images |
@nathany Good thing srcset is finally starting to be supported because I have a hunch double resolution isn't going to play well with a lot of browsers (at least a lot more than the number of machines currently able to display Retina-level graphics): rubygems/bundler#2785 (comment) |
I think we figured out the Markdown story, and it's not a great one, but luckily #80 Inline SVG should work nicely. |
Maybe we should keep this open for now. In particular, more experimentation with srcset may be useful. |
I've played with srcset a little. Even though we only need support for it on Retina screens, it may still be too new to adopt. (SVG is more widespread). With the |
Hey! This has been solved! Woo! |
was: Push GitHub to support image width & height in Markdown
Just reading up on Multimarkdown I found this: https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#anchor-and-image-attributes
Real bummer that there's nothing similar in either standard markdown or GFM. Could we push GitHub to support it so that people don't necessarily have to use HTML (in some places it's not possible, I'm sure) when they eventually want to use Retina badges? Maybe by making GFM support it ourselves?
The text was updated successfully, but these errors were encountered: