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

Max width with percentage doesn't work in chrome #2081

Closed
yuhongcheng2003 opened this issue Feb 29, 2016 · 3 comments
Closed

Max width with percentage doesn't work in chrome #2081

yuhongcheng2003 opened this issue Feb 29, 2016 · 3 comments

Comments

@yuhongcheng2003
Copy link

For 2.0.0-beta2, parent with max-width 100% will set canvas with to 100

Trace code down to: getConstraintWidth
if (hasCWNode || hasCWContainer) { constrainedWidth = Math.min((hasCWNode ? parseInt(constrainedWNode, 10) : Number.POSITIVE_INFINITY), (hasCWContainer ? parseInt(constrainedWContainer, 10) : Number.POSITIVE_INFINITY)); }
scope:
constrainedWContainer: "100%"
constrainedWNode: "none"
constrainedWidth: 100
domNode: canvas
hasCWContainer: true
hasCWNode: false

example

@etimberg etimberg added this to the Version 2.0.1 milestone Feb 29, 2016
@yuhongcheng2003
Copy link
Author

I think this should be a bug instead of enhancement, unless it's documented to not support percentage width in css.

@kennyjwilli
Copy link

Agreed. This should be considered a bug.

@etimberg
Copy link
Member

etimberg commented Apr 3, 2016

Implemented in v2 in #2206

@etimberg etimberg closed this as completed Apr 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants