Fixed navigation spacing in Safari 18.3 (#7979)

This commit is contained in:
Martin Donath
2025-02-12 16:13:13 +07:00
committed by GitHub
parent 9be17e7c67
commit a9bae7f0c7
5 changed files with 8 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

View File

@@ -44,7 +44,7 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.6fdb9009.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.8608ea7d.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.06af60db.min.css' | url }}">

View File

@@ -555,7 +555,9 @@
// Hide nested navigation
&__toggle ~ & {
display: grid;
grid-template-rows: 0fr;
// Hack: we must set a minimum of 8px to work around a bug introduced in
// Safari 18.3, collapsing to a height of 0 see https://t.ly/ViA3N
grid-template-rows: minmax(#{px2rem(8px)}, 0fr);
visibility: collapse;
opacity: 0;
transition:
@@ -571,7 +573,7 @@
// Show nested navigation when toggle is active or indeterminate
&__toggle:is(:checked, .md-toggle--indeterminate) ~ & {
grid-template-rows: 1fr;
grid-template-rows: minmax(#{px2rem(8px)}, 1fr);
visibility: visible;
opacity: 1;
transition:
@@ -726,7 +728,7 @@
// Hack: Always show active navigation tab on breakpoint screen, despite
// of checkbox being checked or not - see https://t.ly/Qc311
.md-nav[data-md-level="1"] {
grid-template-rows: 1fr;
grid-template-rows: minmax(#{px2rem(8px)}, 1fr);
visibility: visible;
opacity: 1;
}