mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 11:41:17 +02:00
fix: theme transition error on ios
This commit is contained in:
parent
93eca1fa7a
commit
aa63803aa2
3 changed files with 8 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue