diff options
author | Jeff King <peff@peff.net> | 2020-06-25 00:02:15 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2020-06-25 00:02:15 +0300 |
commit | f9d9e8a168a8650722cf414a88269b576775c0e7 (patch) | |
tree | 82c85dc921876ab373f4018770d92e9651468ada | |
parent | f680a1dacd835f001458b46f8377b6a37a006f59 (diff) |
css: color code blocks within links as linkscss-fix
We normally color code blocks as $orange. But then if you do the
somewhat obvious thing of trying to put a code block in the link text:
Try the <a href="/docs/git-foo"><code>git-foo</code></a>
it's hard to immediately see that it's actually a link. Let's color
these cases like a normal link.
I have a feeling there's a more elegant CSS solution (possibly using
!important on the link coloring?), but this seems to get the job done,
and the use of scss means we don't have to repeat the actual color
codes.
-rw-r--r-- | app/assets/stylesheets/typography.scss | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/stylesheets/typography.scss b/app/assets/stylesheets/typography.scss index 61575b66..3cae7bbc 100644 --- a/app/assets/stylesheets/typography.scss +++ b/app/assets/stylesheets/typography.scss @@ -260,6 +260,10 @@ code { border: solid 1px #efeee6; } +a code { + color: $link-color; +} + // Quotes q:before, q:after, |