Skip to content

Why my the same CSS styles are applied multiple times #1077

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

Open
nathanredblur opened this issue May 23, 2025 · 1 comment
Open

Why my the same CSS styles are applied multiple times #1077

nathanredblur opened this issue May 23, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@nathanredblur
Copy link

Describe the issue

I rendering a simple component using styleX in storybook, but I notices the same css is applied 4 times.

Image

What could be the reason for this?

Expected behavior

The css is applied only one time.

Steps to reproduce

"@stylexjs/stylex": "0.7.5",
"@stylexjs/webpack-plugin": "^0.9.3",
"storybook": "^8.6.12"

create a simple componente and apply the styles like this

const styles = stylex.create({
  marqueeBase: {
    fontSize: '12px',
  });

const Marquee = ({ title, amount, info }: MarqueeProps) => {
  const { symbol, dollars, cents } = format.currencyObject(amount);

  return (
    <div {...stylex.props(styles.marqueeBase)} data-testid="marquee-container">
       Text
   </div>)
}

Test case

No response

Additional comments

No response

@nathanredblur nathanredblur added the bug Something isn't working label May 23, 2025
@necolas
Copy link
Contributor

necolas commented May 23, 2025

Please update to the latest version first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants