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

Percentages not allowed in sizes="" #234

Closed
gregwhitworth opened this issue Jul 28, 2014 · 2 comments
Closed

Percentages not allowed in sizes="" #234

gregwhitworth opened this issue Jul 28, 2014 · 2 comments

Comments

@gregwhitworth
Copy link

@gregwhitworth gregwhitworth commented Jul 28, 2014

Was speaking with @yoavweiss and I mentioned how sizes in Chrome Canary doesn't allow you to use percentages and he said that this was because percentages were removed due to author confusion (thinking that the percentages would be relative to its parent). I suggest adding this to the speck, list what units are allowed in the sizes attribute. I also think it might be worth considering doing the same for other units that are relative to the parent and not the root/viewport.

Here is an example

@tabatkins
Copy link

@tabatkins tabatkins commented Jul 28, 2014

The spec does explicitly list what types are allowed - it says <length>. Percentages are not <length>s (though in some circumstances percentages are resolved relative to a length, of course).

But I'm fine with adding a more explicit note that percentages aren't allowed (and that you probably want to use the vw/vh units).

@gregwhitworth
Copy link
Author

@gregwhitworth gregwhitworth commented Jul 28, 2014

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.