fix: theme transition error on ios

This commit is contained in:
radishzzz 2025-02-05 21:04:10 +00:00
parent 93eca1fa7a
commit aa63803aa2
3 changed files with 8 additions and 12 deletions

View file

@ -8,16 +8,16 @@ const currentPath = Astro.url.pathname
const { getLocalizedPath } = getPagePath(currentPath)
const marginBottom = {
1: 'mb-1',
2: 'mb-3',
3: 'mb-5',
}[titleSpace] || 'mb-3'
1: 'mb-1',
2: 'mb-3',
3: 'mb-5',
}[titleSpace] || 'mb-3'
---
<header>
<h1 class={`${marginBottom} mt--5 text-12.8 c-primary font-bold font-title`}>
<h1>
<a
class="ios-flash-fix"
class={`${marginBottom} mt--5 text-12.8 c-primary font-bold font-title`}
href={getLocalizedPath('/')}
transition:name="site-title"
data-disable-transition-on-theme

View file

@ -8,7 +8,7 @@ const { getLocalizedPath } = getPagePath(currentPath)
---
<a
class="ios-flash-fix mt--1.4 text-8.32 c-secondary font-bold font-title"
class="mt--1.4 text-8.32 c-secondary font-bold font-title"
href={getLocalizedPath('/')}
transition:name="site-title"
data-disable-transition-on-theme

View file

@ -77,11 +77,7 @@ html[data-theme-transition] [data-disable-transition-on-theme] {
@supports not (view-transition-name: none) {
html:not([data-restore-theme]) {
--at-apply: 'transition-colors duration-300 ease-in-out';
}
html:not([data-restore-theme]) [data-disable-transition-on-theme] {
--at-apply: 'transition-none!';
--at-apply: 'transition-colors duration-300 ease-out';
}
}