Added focus outline to admonitions and details

This commit is contained in:
squidfunk 2023-07-09 18:14:43 +01:00
parent 18cac39370
commit 3e34f6c72d
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
5 changed files with 14 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -44,7 +44,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.2da9acca.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.83068744.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.ecc896b0.min.css' | url }}">

View File

@ -72,6 +72,7 @@ $admonitions: (
border: px2rem(1px) solid $clr-blue-a200;
border-radius: px2rem(4px);
box-shadow: var(--md-shadow-z1);
transition: box-shadow 125ms;
page-break-inside: avoid;
// [print]: Omit shadow as it may lead to rendering errors
@ -79,6 +80,11 @@ $admonitions: (
box-shadow: none;
}
// Admonition on focus
&:focus-within {
box-shadow: 0 0 0 px2rem(4px) color.adjust($clr-blue-a200, $alpha: -0.9);
}
// Hack: Chrome exhibits a weird issue where it will set nested elements to
// content-box. Doesn't happen in other browsers, so looks like a bug.
> * {
@ -164,6 +170,11 @@ $admonitions: (
// Admonition flavour
.md-typeset .admonition.#{$name} {
border-color: $tint;
// Admonition on focus
&:focus-within {
box-shadow: 0 0 0 px2rem(4px) color.adjust($tint, $alpha: -0.9);
}
}
// Admonition flavour title