fix indicator styles flash (#1227)

fix flash of indicator when first added to page
This commit is contained in:
michaelperel 2023-11-16 15:46:29 -05:00 committed by GitHub
parent 7ef95e8963
commit 68661753bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3777,9 +3777,9 @@ return (function () {
if (htmx.config.includeIndicatorStyles !== false) {
getDocument().head.insertAdjacentHTML("beforeend",
"<style>\
." + htmx.config.indicatorClass + "{opacity:0;transition: opacity 200ms ease-in;}\
." + htmx.config.requestClass + " ." + htmx.config.indicatorClass + "{opacity:1}\
." + htmx.config.requestClass + "." + htmx.config.indicatorClass + "{opacity:1}\
." + htmx.config.indicatorClass + "{opacity:0}\
." + htmx.config.requestClass + " ." + htmx.config.indicatorClass + "{opacity:1; transition: opacity 200ms ease-in;}\
." + htmx.config.requestClass + "." + htmx.config.indicatorClass + "{opacity:1; transition: opacity 200ms ease-in;}\
</style>");
}
}