Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background color CSS does not get applied #38

Open
l30c0d35 opened this issue Feb 2, 2022 · 2 comments
Open

Background color CSS does not get applied #38

l30c0d35 opened this issue Feb 2, 2022 · 2 comments

Comments

@l30c0d35
Copy link

l30c0d35 commented Feb 2, 2022

The transition text has a background color inside a h1 with a transparent background. The transition text's background color is not being affected by setting it to transparent.
How would I set the <TextTransition> background color to be transparent?

<h1 className={styles.heading}>
    Some text ...
    <TextTransition
      className={styles.transitionText}
      text={ areas[index % areas.length] }
      springConfig={ presets.stiff }
    />
  </h1>

CSS

heading {
  background-color: transparent; // is being applied 
  ...
}

.transitionText {
  background-color: transparent; // is not being applied 
  ...
}

btw cool package and easy to use

@l30c0d35
Copy link
Author

l30c0d35 commented Feb 3, 2022

it seems to be overwritten by a global style:

* {
  background-color: black;
}

but why doesn't the transitionText style overwrite it, as the heading style does?

@WinterCore
Copy link
Owner

Hey. Sorry for the delay, been a bit busy.

If you're still facing this issue you could you reproduce it in a codesandbox example because I couldn't reproduce it, setting the background color on the parent works properly.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants