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

Capitalization throws off CSS scoping #1269

Closed
teleclimber opened this issue Mar 22, 2018 · 1 comment · Fixed by #1314
Closed

Capitalization throws off CSS scoping #1269

teleclimber opened this issue Mar 22, 2018 · 1 comment · Fixed by #1314

Comments

@teleclimber
Copy link

If you put this in REPL:

<h1>
	Big red Comic Sans
</h1>

<H1>
	Big red Comic Sans
</H1>

<style>
	h1 {
		color: red;
		font-size: 2em;
		font-family: 'Comic Sans MS';
	}
</style>

You'll see one of the H1s is styled the other is not. Element names are not case sensitive in CSS, so both elements should be styled.

See this codepen for non-svelte HTML result:

https://codepen.io/teleclimber/pen/GxmvGJ

Thanks!

@Rich-Harris
Copy link
Member

Thanks — fixed in #1314. You should be aware though that as of v2, capitalised tags will be assumed to be components rather than elements, so <H1>...</H1> would be an error.

Rich-Harris added a commit that referenced this issue Apr 4, 2018
make CSS DCE case-insensitive
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