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 not using Menlo font outside of README #137

Closed
beltex opened this issue Jan 2, 2015 · 6 comments · Fixed by #168
Closed

Code not using Menlo font outside of README #137

beltex opened this issue Jan 2, 2015 · 6 comments · Fixed by #168
Assignees
Milestone

Comments

@beltex
Copy link
Contributor

beltex commented Jan 2, 2015

Code inside a README displays fine, uses Menlo at 12px (like Apple's own docs), but anywhere else it's monospace at 11px (which is quite illegible in comparison). Looks like jazzy.css.scss doesn't apply the style to code elsewhere.

@segiddins
Copy link
Collaborator

We'd love to see a PR changing that! (With screenshots for comparison, to make seeing the before/after difference easier)

@jpsim
Copy link
Collaborator

jpsim commented Jan 2, 2015

I'm closing this as a duplicate of #95, which would fix this and more.

@jpsim jpsim closed this as completed Jan 2, 2015
@beltex
Copy link
Contributor Author

beltex commented Jan 4, 2015

@segiddins Sure! :)

@jpsim Not a problem. Would you be open to taking a small patch for this in the meantime, since this is user facing?

Patch

diff --git a/lib/jazzy/assets/css/jazzy.css.scss b/lib/jazzy/assets/css/jazzy.css.scss
index f4b14b4..e1c22b0 100644
--- a/lib/jazzy/assets/css/jazzy.css.scss
+++ b/lib/jazzy/assets/css/jazzy.css.scss
@@ -1,5 +1,6 @@
 $doc_coverage_color: #999;
 $content_wrapper_width: 980px;
+$code-font: 12px Menlo, monospace;

 html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td {
   background: transparent;
@@ -97,6 +98,7 @@ html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr
     font-size: 1.4em;
     word-break: break-all;
     > code {
+      font: $code-font;
       display: inline-block;
     }
   }
@@ -149,6 +151,7 @@ html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr
   .section .declaration {
     margin-top: 21px;
     code {
+      font: $code-font;
       color: rgba(128, 128, 128, 1);
       margin-bottom: 15px;
       padding-bottom: 6px;

Before

screen shot 2015-01-03 at 10 33 33 pm

After

Tested on Firefox & Safari.

screen shot 2015-01-03 at 10 32 42 pm

beltex added a commit to beltex/SystemKit that referenced this issue Jan 12, 2015
- Applied small patch seen here in link below to fix font for code (to Menlo)

  realm/jazzy#137 (comment)
beltex added a commit to beltex/SMCKit that referenced this issue Jan 12, 2015
- Applied small patch seen here in link below to fix font for code (to Menlo)

  realm/jazzy#137 (comment)
@beltex
Copy link
Contributor Author

beltex commented Feb 26, 2015

Ping! :)

Only because #95 could take a while till its implemented.

@segiddins
Copy link
Collaborator

Sure, send in a PR and I'd be happy to take a look!

@beltex
Copy link
Contributor Author

beltex commented Feb 26, 2015

Awesome! :)

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

Successfully merging a pull request may close this issue.

4 participants