Skip to content

Commit

Permalink
Added background color to code blocks in hovered links
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Mar 26, 2022
1 parent 71dd84a commit 6b91c8d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
1 change: 0 additions & 1 deletion material/assets/stylesheets/main.36ad6006.min.css

This file was deleted.

1 change: 0 additions & 1 deletion material/assets/stylesheets/main.36ad6006.min.css.map

This file was deleted.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.644de097.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions material/assets/stylesheets/main.644de097.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion material/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.36ad6006.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.644de097.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}">
Expand Down
16 changes: 11 additions & 5 deletions src/assets/stylesheets/main/_typeset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ kbd {
&:focus,
&:hover {
color: var(--md-accent-fg-color);

// Inline code block
code {
background-color: var(--md-accent-fg-color--transparent);
}
}

// Inline code block
code {
color: currentcolor;
}

// Show outline for keyboard devices
Expand Down Expand Up @@ -200,6 +210,7 @@ kbd {
background-color: var(--md-code-bg-color);
border-radius: px2rem(2px);
box-decoration-break: clone;
transition: background-color 125ms;

// Hide outline for pointer devices
&:not(.focus-visible) {
Expand All @@ -208,11 +219,6 @@ kbd {
}
}

// Ensure link color in code blocks
a code {
color: currentcolor;
}

// Unformatted content
pre {
position: relative;
Expand Down

0 comments on commit 6b91c8d

Please sign in to comment.