mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
minimise settle time
This commit is contained in:
Vendored
+3
@@ -505,6 +505,7 @@ body {
|
||||
|
||||
&:has(.htmx-request) {
|
||||
opacity: 0.25;
|
||||
/// based on how long it takes to get a response from the server
|
||||
transition: opacity 500ms ease-out;
|
||||
}
|
||||
|
||||
@@ -515,6 +516,8 @@ body {
|
||||
|
||||
&.htmx-settling {
|
||||
opacity: 0;
|
||||
/// the duration here doesn't really matter
|
||||
/// this is just so that htmx animates the change
|
||||
transition: opacity 0ms;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
</head>
|
||||
|
||||
{* NOTE: hx-swap="show:window:top" isn't needed when we hx-boost the body *}
|
||||
{* NOTE: we need to specify swap and settle in hx-swap otherwise htmx won't apply the classes; durations set low for minimal impact *}
|
||||
{* NOTE: we need to specify settle in hx-swap otherwise htmx won't apply the classes; duration set low for minimal impact *}
|
||||
<body
|
||||
class="bg-neutral-900"
|
||||
hx-boost="true"
|
||||
hx-swap="innerHTML settle:100ms"
|
||||
hx-swap="innerHTML settle:1ms"
|
||||
hx-target="this"
|
||||
hx-indicator="#loading-indicator"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user