Skip to content
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

Icons not visible #64

Closed
Regaddi opened this issue Jun 13, 2018 · 7 comments · Fixed by #72
Closed

Icons not visible #64

Regaddi opened this issue Jun 13, 2018 · 7 comments · Fixed by #72
Labels
bug Something isn't working

Comments

@Regaddi
Copy link
Contributor

Regaddi commented Jun 13, 2018

When accessing the website with a bad network connection the icons are potentially invisible. The user might miss that there is a navigation icon, because the icon itself could not load.

We should provide a fallback by using native symbols.

Proposals:

Menu icon: ☰ (☰)
Accordion caret: ▼(▼)

Edit: they seem to be missing completely right now 🤔

Edit2:
missing on tc39.github.io/beta
visible on tc39-beta.netlify.com

@Regaddi
Copy link
Contributor Author

Regaddi commented Jun 13, 2018

OK, it's because of bad references:

image

image

Path to main.js and style.css is correct, but not to normalize.css and menu.svg.
Are those paths transformed during deployment?
Would it be better to have them relative to the document?

@ljharb
Copy link
Member

ljharb commented Jun 13, 2018

Could the icons be data URIs or inline SVGs instead of needing a separate download?

@Regaddi
Copy link
Contributor Author

Regaddi commented Jun 13, 2018

Potentially, yes. But that won't solve the issue on normalize.css.
I don't understand yet, why the paths differ between both URLs. I thought they contain the same state.

@keithamus
Copy link
Member

You can make them absolute which tends to make development across forks/repos easier:

<link href="{{site.github.url}}/css/....">

Locally site.github.url is just ''. When served through gh-pages it'll be https://tc39.github.io/beta, and when forked to e.g. me it'll be https://keithamus.github.io/beta

@keithamus
Copy link
Member

Also while on the topic of URLs - it is preferred to avoid protocol relative URLs (that is, urls without the http, e.g. src="//cdnjs.cloudflare.com...". This should be avoided because if you have an https capable asset, it should ideally always be served with https. (See https://www.paulirish.com/2010/the-protocol-relative-url/)

@Regaddi
Copy link
Contributor Author

Regaddi commented Jun 13, 2018

I don't understand yet, why the paths differ between both URLs. I thought they contain the same state.

I just totally looked into the wrong file
Thanks @keithamus!

@ljharb
Copy link
Member

ljharb commented Jun 13, 2018

I commented on the PR, but why would we not want the paths to always be root-relative - ie, start with a /?

The rationale to avoid protocol-less URLs isn't that important when gh-pages, and individual sites, can be forced onto HTTPS, but it doesn't really matter either way imo.

@codehag codehag added the bug Something isn't working label Jun 14, 2018
codehag added a commit that referenced this issue Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants