Fixed copy-to-clipboard adding blank lines when using line anchors (8.1.0 regression)

This commit is contained in:
squidfunk 2021-12-12 12:04:20 +01:00
parent d7155fc523
commit 687466d7ba
7 changed files with 9 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.fc338f16.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.840a26e4.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.dc90facb.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.dc90facb.min.css' | url }}">

View File

@ -204,9 +204,12 @@
// Code block line anchors - Chrome and Safari seem to have a strange bug // Code block line anchors - Chrome and Safari seem to have a strange bug
// where scroll margin is not applied to anchors inside code blocks. Setting // where scroll margin is not applied to anchors inside code blocks. Setting
// positioning to absolute seems to fix the problem. Interestingly, this does // positioning to absolute seems to fix the problem. Interestingly, this does
// not happen in Firefox. // not happen in Firefox. Furthermore we must set `visibility: hidden` or
// the copy to clipboard functionality will include an empty line between
// each set of lines.
code a[id] { code a[id] {
position: absolute; position: absolute;
visibility: hidden;
} }
} }

View File

@ -63,7 +63,7 @@
} }
// Button on focus/hover // Button on focus/hover
&:where(:focus, :hover) { &:is(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);
} }