Skip to content

Commit 9cc83af

Browse files
committed
fix transition with js
1 parent 6d646e8 commit 9cc83af

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

dist/script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7469,7 +7469,8 @@ if (cookieConsentNotice) {
74697469
cookieConsentConfigScript.removeAttribute('data-config');
74707470
cookieConsentNotice.removeAttribute('data-text');
74717471
setTimeout(function () {
7472-
return cookieConsentNotice.classList.remove('cookies--closing');
7472+
cookieConsentNotice.classList.remove('cookies--closing');
7473+
cookieConsentNotice.style.transitionDuration = "200ms";
74737474
}, 110);
74747475
});
74757476
}

dist/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
max-width: 100%;
88
overflow: auto;
99
z-index: 9999;
10-
transition: transform 200ms ease-out, opacity 200ms ease-out;
10+
transition: transform 0ms ease-out, opacity 0ms ease-out;
1111
}
1212
#cookies-policy.cookies--closing {
1313
opacity: 0;

resources/js/script.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ if (cookieConsentNotice) {
1818
cookieConsentConfigScript.removeAttribute('data-config');
1919
cookieConsentNotice.removeAttribute('data-text');
2020

21-
setTimeout( () => cookieConsentNotice.classList.remove('cookies--closing'), 110);
21+
setTimeout( () => {
22+
cookieConsentNotice.classList.remove('cookies--closing');
23+
cookieConsentNotice.style.transitionDuration = "200ms";
24+
}, 110);
2225
});
2326
}

resources/scss/style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
max-width: 100%;
88
overflow: auto;
99
z-index: 9999;
10-
transition: transform 200ms ease-out,
11-
opacity 200ms ease-out;
10+
transition: transform 0ms ease-out,
11+
opacity 0ms ease-out;
1212

1313
&--closing {
1414
opacity: 0;

0 commit comments

Comments
 (0)