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

Code links #209

Closed
Mottie opened this issue Feb 11, 2015 · 11 comments
Closed

Code links #209

Mottie opened this issue Feb 11, 2015 · 11 comments

Comments

@Mottie
Copy link
Member

Mottie commented Feb 11, 2015

I was posting some code which linked back to documentation and noticed that the link was not being styled; there is no indication that it is a link except for hovering over it:

linked code

I'm not sure if making it match the base color would be a good idea, but maybe we could at least underline it? What do you guys think?

@silverwind
Copy link
Member

Definitely a bug if it's colored with the style disabled, looking into it.

@silverwind
Copy link
Member

Well that was easy, but may affect other code tags, I must've put it there for a reason, but I don't remember right now.

@silverwind
Copy link
Member

Hmm, underline still missing.

@silverwind silverwind reopened this Feb 11, 2015
@silverwind
Copy link
Member

Strange that it doesn't underline on hover, given that we don't touch text-decoration. There's a:hover, a:active { text-decoration: underline } in GH's sheet.

@Mottie could you have a look in Chrome's DevTools? Firefox still shows the underline in computed styles, but doesn't render it.

@Mottie
Copy link
Member Author

Mottie commented Feb 11, 2015

Hmm, I'm not seeing where the text-decoration is being changed, when I click on the code block, I do see this entry show up in the user agent stylesheet

a:-webkit-any-link {
  color: -webkit-link;
  text-decoration: underline;
  cursor: auto;
}

If I add this css (even without the !important flag) to the stylesheet, it appears to work:

a:hover code {
  text-decoration: underline;
}

But my question still is about the text color. There isn't any syntax highlighting, so should we leave the text off-white or the base color?

@silverwind
Copy link
Member

so should we leave the text off-white or the base color?

My general rule of thumb is, if it's colored without the style, it should be colored with the style, so base color seems fine to me.

b4
after

@Mottie
Copy link
Member Author

Mottie commented Feb 11, 2015

Ok, sounds reasonable 😸

@silverwind
Copy link
Member

This underline thing smells like a Firefox bug to me, or a spec misbehaviour in Chrome, or both. I'm not sure if that property shall be inherited by child elements att all. Setting

a:hover code {text-decoration: underline !important}

does fix it, but I'm afraid this might have side-effects on other parts of the site. Hmm.

@silverwind
Copy link
Member

I have an idea on how to fix this without causing too much side-effects.

@silverwind
Copy link
Member

Please check if you still have the underline on hover in Chrome.

@Mottie
Copy link
Member Author

Mottie commented Feb 11, 2015

Sorry, I've been doing a lot of running around today... yeah that is working just fine :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants