W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2017

Re: [csswg-drafts] [css-sizing] max-width: 100% while also using width: min-content on container

From: Oliver Williams via GitHub <sysbot+gh@w3.org>
Date: Mon, 06 Nov 2017 11:34:08 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-342122962-1509968048-sysbot+gh@w3.org>
Thanks for this ingenious solution @Loirooriol. It solves the immediate problem for me :)

I can't help feeling the spec should let me solve the problem in the way I originally attempted as it is more intuitive (at least to me). 
Even if I set a width of max-content on the image, setting a max-width of 100% still squishes the image down even on large screens 
   ```
.container {
width: min-content;
}

img {
width: max-content;
max-width: 100%;
}

```

-- 
GitHub Notification of comment by o-t-w
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1927#issuecomment-342122962 using your GitHub account
Received on Monday, 6 November 2017 11:34:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 6 November 2017 11:34:11 UTC