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

NumberFlow becomes invisible when using background-clip: text #97

Open
maximilianniemann opened this issue Jan 12, 2025 · 1 comment
Open

Comments

@maximilianniemann
Copy link

maximilianniemann commented Jan 12, 2025

NumberFlow version

[email protected]

Framework version

[email protected] & [email protected]

Describe the bug and the steps to reproduce it

Description

When attempting to style the NumberFlow element using background-clip: text (to apply a gradient to the text), the element becomes invisible. We would like to use NumberFlow in combination with text gradients, but this issue prevents that styling option.

Steps to Reproduce

  1. Add a NumberFlow element to the page.
  2. Apply a gradient background to the element.
  3. Set background-clip: text and color: transparent for the text gradient effect.
  4. Observe the NumberFlow element becoming invisible.

Expected Behavior

The NumberFlow text should display properly with the gradient applied, maintaining visibility.

Actual Behavior

The NumberFlow text becomes invisible when background-clip: text is used.

Environment

  • Browser: Chrome, Safari
  • Operating System: macOS
Screenshot 2025-01-12 at 23 46 50

Minimal reproduction (greatly appreciated)

https://codesandbox.io/p/sandbox/gjqkpj

@barvian
Copy link
Owner

barvian commented Jan 13, 2025

Hi, thanks for filing. This has come up before; it seems to be a browser limitation. Unfortunately I can't work around it 🫤

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

No branches or pull requests

2 participants