Jump to content
Search Community

Default state shown before animation

shalildev test
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

  • Solution

 

Welcome to the forum.

 

2 hours ago, shalildev said:

am I doing something wrong or?

 

What you're seeing is an FOUC - a flash of unstyled content.

It's not wrong per se, but more of a logical result of how your code gets processed - it's explained in a bit more detail in the video on the page linked below.

 

 

There's multiple ways you can handle a situation like that, and different scenarios may require different approaches.

See the Pen OJaazPL by akapowl (@akapowl) on CodePen


 

  • Like 2
Link to comment
Share on other sites

  • 7 months later...

Sorry to add to this solved thread @akapowl, but I ran into some odd behavior trying this pen with buttons.

 

See the Pen GRLZOpo by jade_lin (@jade_lin) on CodePen

 

This is more of a CSS question than GSAP, but if you delete some of the!important attributes from the button CSS, somehow showing the button from a "hidden" visibility state causes many button values to be lost.

 

Is normal or expected behavior?

 

When I don't apply the visibility: hiddenattribute, the button shows as normal...

Link to comment
Share on other sites

Hi @jlin,

 

I read your post a few times and checked your demo and unfortunately I can't seem to understand what's the issue you're having. 

10 hours ago, jlin said:

somehow showing the button from a "hidden" visibility state causes many button values to be lost.

What exactly you mean with this? What button values?

 

Happy Tweening!

Link to comment
Share on other sites


You are loading tailwind.css via the settings in the HTML section.
Without tailwind, the !important statements don't matter at all, it seems.

So it looks to me like it is actually more of a tailwind question;
and you'll have to find out what tailwind does to your button.

To be honest, asking a plumber why the lamp in your living room is flickering, might not be the best approach for seeking help.
If you can not find the issue yourself, I'd suggest asking in one of tailwind's support channels, e.g. their discussion forum on GitHub.

https://v1.tailwindcss.com/community
https://github.com/tailwindlabs/tailwindcss/discussions

  • Like 2
Link to comment
Share on other sites

On 3/12/2024 at 5:37 AM, akapowl said:


To be honest, asking a plumber why the lamp in your living room is flickering, might not be the best approach for seeking help.
If you can not find the issue yourself, I'd suggest asking in one of tailwind's support channels, e.g. their discussion forum on GitHub.

https://v1.tailwindcss.com/community
https://github.com/tailwindlabs/tailwindcss/discussions

Apologies @akapowlI didn't noticed you responded to my question -- (need to turn on my email which I just did now). Yes, this is more of a CSS issue. I'll check in those channels, and 😆 at the GIF and analogy.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...