Closed buunguyen closed 8 years ago
:+1: I can confirm this fixes it.
That's unfortunate. I imagine you have already tried the solutions from here: http://stackoverflow.com/a/24359746/883015 Although it might not be optimal, you could use hosted versions from cdnjs: https://cdnjs.com/libraries/octicons Otherwise, it might be better to just fall back to images.
I agree for the fallback on images for Firefox.
I got it. Let's just use SVG like GitHub is doing right now. For example (Star Button :star: ):
<svg aria-hidden="true" class="octicon octicon-star" height="16" role="img" version="1.1" viewBox="0 0 14 16" width="14"><path d="M14 6l-4.9-0.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14l4.33-2.33 4.33 2.33L10.4 9.26 14 6z"></path></svg>
Can the fix be applied strictly to the github.less only? So that it wouldn't affect GitLab. I suppose we can conditionally change templates & code, but that change will be ugly and difficult to maintain.
How about using DataURI to include SVG directly in github.less
?
@buunguyen Ahhh right... I understand :( @crashbell That might work. Can anyone test or confirm this?
@joedf I tested and it could work with some adjustment. The code would be something like:
@crashbell thanks for looking into this. Do you have time for a PR?
I will work on this within this weekend. It pretty takes time to find the corresponding SVG icons.
@crashbell Got the SVGs for ya, looking foward to the PR :) :+1:
Unicode | Class name | SVG |
---|---|---|
f02c | .octicon-question | question.svg |
f001 | .octicon-repo | repo.svg |
f020 | .octicon-git-branch | git-branch.svg |
f016 | .octicon-file-directory | file-directory.svg |
f011 | .octicon-file-text | file-text.svg |
f00b | .octicon-cloud-download | cloud-download.svg |
f017 | .octicon-file-submodule | file-submodule.svg |
f02f | .octicon-gear | gear.svg |
f078 | .octicon-chevron-right | chevron-right.svg |
f0a4 | .octicon-chevron-left | chevron-left.svg |
Thank you @joedf A PR was made here #252
Great! :+1:
Updated version has been submitted to the stores. Many thanks to @crashbell and @joedf for helping out with this!
GitHub recently introduced a change. Basically the site doesn't load the Octicons icon font anymore. This causes all icons in Octotree to show strange characters. I have released the fix for Chrome in 2.0.4. If you encounter the issue, please make sure the extension is up to date (or remove & add back if necessary). I will release an update for Opera shortly.
As for Firefox and Safari, there's no solution yet. The current fix requires embedding the font file with the extension and declare a
@font-face
in github.less. But I haven't found a way to embed custom font for Firefox addon (haven't tried Safari). I tried to base64-encode the font and embedded it into@font-face
's src, but still couldn't make it work. If anyone has any suggestion or make a PR to fix, it's highly welcome.