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

getCssText is broken when using all: unset #1166

Open
vavdav opened this issue Jan 6, 2025 · 0 comments
Open

getCssText is broken when using all: unset #1166

vavdav opened this issue Jan 6, 2025 · 0 comments

Comments

@vavdav
Copy link

vavdav commented Jan 6, 2025

Bug report

Describe the bug

I wanted to use getCssText to replicate styles into pip window and found this bug. When there is all: unset the order of declarations is not correct in chrome, because it expands all declarations.

More info here: https://stackoverflow.com/questions/79332575/wrong-order-of-css-declarations-when-using-all-unset-and-csstext

To Reproduce

  1. declare component like this
    const StyledButton = styled('div', {all: 'unset', borderRadius: '12px'})
  2. call getCssText
  3. explore the output and see the order of declarations in chrome

Expected behavior

Order is correct

System information

  • Browser (if applies) chrome

Additional context

It is probably mostly a bug in Chrome as it wrongly returns value of rule.cssText so this function can not be used in that case. Adding it here for others as it is currently not maintained anymore.

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

1 participant