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

Set style attribute correctly when spread attr present #1684

Merged
merged 1 commit into from
Aug 24, 2018

Conversation

kaisermann
Copy link
Member

Related to #1664

@jacwright
Copy link
Contributor

Adding a runtime test for this would be a great addition.

@kaisermann
Copy link
Member Author

kaisermann commented Aug 24, 2018

@jacwright I agree. I just don't know how to check specifically for the style.cssText since jsdom accepts assigning css directly to the style prop.

The test

<div {...props}>red text</div>

<script>
	export default {
		data: () => ({
			props: {
				style: 'color: red;'
			}
		})
	};
</script>

would pass without this PR but would fail in some older browsers 🤔

@jacwright
Copy link
Contributor

Ah, I see. 👍

@Rich-Harris Rich-Harris merged commit fe8e31a into sveltejs:master Aug 24, 2018
@Rich-Harris
Copy link
Member

thank you!

@kaisermann kaisermann deleted the spread-attr-style branch February 6, 2020 01:59
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 this pull request may close these issues.

3 participants