- Notifications
You must be signed in to change notification settings - Fork1.1k
Add the default monospace font stack for <code> elements#427
Add the default monospace font stack for <code> elements#427
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Unfortunately <code> elements weren't getting the monospace font stack theydeserved so they looked a little out of place. 💄
@jacobbednarz Thanks! We should avoid another font stack definition though, could you look at makingthis selector less specific instead? |
@tobiasahlin Can definitely give it a whirl. :) |
@tobiasahlin Having a look into this, there isn't too much that can be done with that selector as it controls all the inline code styles (for lists, definition lists, etc) so it as about stripped back as I can see it continuing to work. Additionally, if I turn the To tidying this up, I can remove the font stack from that selector you mentioned and into the .content .verseblock-content,.content .sectionbody .dlistdt,.contentp>tt,.contentdlcode,.contentulcode,pcode {-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-background-clip: padding;-webkit-background-clip: padding-box;background-clip: padding-box;border:1px solid#ccc;background-color:#f9f9f9;padding:0px3px;display: inline-block;} and code {white-space: nowrap;font:12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;} What are your thoughts on this one? Feel free to let me know if you have another way I could approach this one as I could be overlooking something here. |
Hey@tobiasahlin, |
@jacobbednarz So sorry for completely dropping this ball. My bad. Where are you seeing |
All good - I thought you may have been pulled onto another project and just left this little old pull request behind. 😉
Some examples are in tables (oauth/index.html#L105) and |
Screenshots help. 😉 |
And the link -https://developer.github.com/v3/oauth/ to a page with some more examples. |
@jacobbednarz Nicely spotted! Looking at the current font stack, it's a bit arbitrary. Would you mind changing it to be identical to github.com? I.e. With that in, I'd be happy to merge this |
- Make the <code> font stack more consistent from GitHub.com.- Refactor code/pre selector rules to be generic enough to catch allthe lingering code blocks.
Thanks@tobiasahlin! Can you just check that commit10d0f78 is what you are after? |
@@ -1017,7 +1017,6 @@ div.sidebar-module ul ul li span { | |||
.content dl code, | |||
.content ul code, | |||
p code { | |||
font: 12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think we need to keep the font stack here, or it would be dropped from.content .verseblock-content
,.content .sectionbody .dlist dt
, and.content p > tt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I could be wrong but from what I can see thecode
block onL#1157 further down catches it and applies the correct styling - I think that was why I chose to have a generic catch allcode
selector.
Also, I wasn't able to find.content .verseblock-content
or.content .sectionbody .dlist dt
used anywhere in the markup so perhaps it has since been removed and we can safely remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@jacobbednarz 💥 You're right!
@jacobbednarz Looks great apart from my comment! |
…orrect-monospace-fontAdd the default monospace font stack for <code> elements
@jacobbednarz Thanks! ✨ 💎 |
Awesome! Thanks for the feedback and help with getting this one out 🍰 |
Unfortunately
<code>
elements weren't getting the monospace font stack they deserved so they looked a little out of place. 💄Turns


into