vue-cookie-accept-decline icon indicating copy to clipboard operation
vue-cookie-accept-decline copied to clipboard

Cookie banner not loading style/animation in vue3

Open v2-M3nTh0LL opened this issue 4 months ago • 3 comments

Hi guys,

I am migrating a pretty big project from Vue2 to Vue3.4.19 and noticed there's an issue with the Cookie banner not showing properly. This is my implementation. Worth mentioning that the functionality is on point, the only issue is the animation and the design itself

Screenshot 2024-02-19 at 18 53 24

Appearance on Vue 2 Screenshot 2024-02-19 at 18 36 23

Appearance in Vue 3 (I have to find the div in Inspect Element and select Scroll to view to be able to see it) Screenshot 2024-02-19 at 18 53 08

v2-M3nTh0LL avatar Feb 19 '24 16:02 v2-M3nTh0LL

Hi there, hmm right away I'd assume the CSS isn't being loaded. I see you're importing it on line 20, but I'd check to see if your version of Vue 3 has updated the instructions on how to import a library's CSS.

One workaround regardless of what you find would be to copy the CSS source code directly to your project and load it. If you load it at the right scope, the styles should pick up just fine.

Let me know how it goes.

johndatserakis avatar Feb 22 '24 02:02 johndatserakis

@johndatserakis thanks for the tips. I already implemented the workaround after posting the issue, and it does work indeed, but I'd rather get the import to work. I'll check Vue's CSS import and hopefully it'll sort things out.

v2-M3nTh0LL avatar Feb 22 '24 11:02 v2-M3nTh0LL

Got it. Yea sorry a bit swamped right now, will look into this ASAP.

johndatserakis avatar Mar 02 '24 04:03 johndatserakis