Skip to content

Commit

Permalink
Change the styling of inline code and allow links to colorize inline …
Browse files Browse the repository at this point in the history
…code. Resolves mkdocs#718
  • Loading branch information
Jim Porter committed Dec 12, 2015
1 parent 0630c49 commit 55e1d0c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
21 changes: 17 additions & 4 deletions mkdocs/themes/mkdocs/css/base.css
Expand Up @@ -65,7 +65,7 @@ pre, .rst-content tt {
max-width: 100%;
background: #fff;
border: solid 1px #e1e4e5;
color: #e74c3c;
color: #333;
overflow-x: auto;
}

Expand All @@ -75,9 +75,22 @@ code.code-large, .rst-content tt.code-large {

code {
padding: 2px 5px;
color: #c7254e;
background-color: #f9f2f4;
font-size: 75%;
background: #fff;
border: solid 1px #e1e4e5;
color: #333;
}

pre code {
background: transparent;
border: none;
}

a code {
color: #2FA4E7;
}

a:hover code, a:focus code {
color: #157AB5;
}

code, kbd, pre, samp {
Expand Down
15 changes: 15 additions & 0 deletions mkdocs/themes/readthedocs/css/theme_extra.css
Expand Up @@ -69,6 +69,21 @@ p code {
word-wrap: break-word;
}

/*
* Fix link colors when the link text is inline code.
*
* https://github.com/mkdocs/mkdocs/issues/718
*/
a code {
color: #2980B9;
}
a:hover code {
color: #3091d1;
}
a:visited code {
color: #9B59B6;
}

/*
* The CSS classes from highlight.js seem to clash with the
* ReadTheDocs theme causing some code to be incorrectly made
Expand Down

0 comments on commit 55e1d0c

Please sign in to comment.