Mitigate flicker on code blocks when switching color scheme

This commit is contained in:
squidfunk 2022-04-01 16:57:26 +02:00
parent c86a724d5b
commit 041e95b505
4 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.8ab0c697.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.75693d7e.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.e6a45f82.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}">

View File

@ -180,6 +180,7 @@ kbd {
// Inline code block // Inline code block
code { code {
color: currentcolor; color: currentcolor;
transition: background-color 125ms;
} }
// Show outline for keyboard devices // Show outline for keyboard devices
@ -210,7 +211,6 @@ kbd {
background-color: var(--md-code-bg-color); background-color: var(--md-code-bg-color);
border-radius: px2rem(2px); border-radius: px2rem(2px);
box-decoration-break: clone; box-decoration-break: clone;
transition: background-color 125ms;
// Hide outline for pointer devices // Hide outline for pointer devices
&:not(.focus-visible) { &:not(.focus-visible) {