mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-29 17:22:37 -04:00
Added focus outline to admonitions and details
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user