mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 03:56:19 +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 { getLocalizedPath } = getPagePath(currentPath)
|
||||||
|
|
||||||
const marginBottom = {
|
const marginBottom = {
|
||||||
1: 'mb-1',
|
1: 'mb-1',
|
||||||
2: 'mb-3',
|
2: 'mb-3',
|
||||||
3: 'mb-5',
|
3: 'mb-5',
|
||||||
}[titleSpace] || 'mb-3'
|
}[titleSpace] || 'mb-3'
|
||||||
---
|
---
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1 class={`${marginBottom} mt--5 text-12.8 c-primary font-bold font-title`}>
|
<h1>
|
||||||
<a
|
<a
|
||||||
class="ios-flash-fix"
|
class={`${marginBottom} mt--5 text-12.8 c-primary font-bold font-title`}
|
||||||
href={getLocalizedPath('/')}
|
href={getLocalizedPath('/')}
|
||||||
transition:name="site-title"
|
transition:name="site-title"
|
||||||
data-disable-transition-on-theme
|
data-disable-transition-on-theme
|
||||||
|
|
|
@ -8,7 +8,7 @@ const { getLocalizedPath } = getPagePath(currentPath)
|
||||||
---
|
---
|
||||||
|
|
||||||
<a
|
<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('/')}
|
href={getLocalizedPath('/')}
|
||||||
transition:name="site-title"
|
transition:name="site-title"
|
||||||
data-disable-transition-on-theme
|
data-disable-transition-on-theme
|
||||||
|
|
|
@ -77,11 +77,7 @@ html[data-theme-transition] [data-disable-transition-on-theme] {
|
||||||
|
|
||||||
@supports not (view-transition-name: none) {
|
@supports not (view-transition-name: none) {
|
||||||
html:not([data-restore-theme]) {
|
html:not([data-restore-theme]) {
|
||||||
--at-apply: 'transition-colors duration-300 ease-in-out';
|
--at-apply: 'transition-colors duration-300 ease-out';
|
||||||
}
|
|
||||||
|
|
||||||
html:not([data-restore-theme]) [data-disable-transition-on-theme] {
|
|
||||||
--at-apply: 'transition-none!';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue