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

Wrong precedence when using style: directive with style attribute #7475

Closed
MathiasWP opened this issue Apr 21, 2022 · 1 comment · Fixed by #7610
Closed

Wrong precedence when using style: directive with style attribute #7475

MathiasWP opened this issue Apr 21, 2022 · 1 comment · Fixed by #7610

Comments

@MathiasWP
Copy link
Contributor

Describe the bug

When using a style: directive together with the style attribute, the attribute takes precedence over the directive if the attribute changes. This behaviour feels opposite of what is stated in the docs:

"When style: directives are combined with style attributes, the directives will take precedence"

Reproduction

REPL

https://svelte.dev/repl/abce30dc4762420d8e6fc28297d0fcb2?version=3.47.0

Logs

No response

System Info

System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 23.02 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.1.0 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 100.1.37.113
    Chrome: 100.0.4896.127
    Edge: 100.0.1185.44
    Firefox: 99.0.1
    Safari: 14.1.1
  npmPackages:
    svelte: ^3.47.0 => 3.47.0

Severity

annoyance

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

Successfully merging a pull request may close this issue.

2 participants