- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Mon, 19 Jul 2010 12:46:48 -0700
- To: Brian Manthos <brianman@microsoft.com>
- CC: "www-style@w3.org" <www-style@w3.org>
On 07/16/2010 11:39 AM, Brian Manthos wrote: > Assume (for simplicity): > 1. Image referenced via background-image has intrinsic width, height(, aspect ratio) > 2. Element upon which the style is applied is larger than the image in both dimensions, and larger than 10px by 20px > > Scenarios: > a. background-repeat:round repeat; background-size: auto auto; > b. background-repeat:repeat round ; background-size: auto auto; These two will preserve aspect ratio, because there is a constraint on one dimension but not on the other. > c. background-repeat:round round ; background-size: auto auto; This will not preserve aspect ratio. > d. background-repeat:round repeat; background-size: 10px auto; This will preserve aspect ratio because there is only a constraint on the horizontal dimension, not the vertical one. > e. background-repeat:repeat round ; background-size: 10px auto; > f. background-repeat:round round ; background-size: 10px auto; > g. background-repeat:round repeat; background-size: auto 20px; These will not preserve aspect ratio because there are constraints on both dimensions. > h. background-repeat:repeat round ; background-size: auto 20px; This will preserve aspect ratio because there are no constraints on the horizontal dimension. > i. background-repeat:round round ; background-size: auto 20px; > j. background-repeat:round repeat; background-size: 10px 20px; > k. background-repeat:repeat round ; background-size: 10px 20px; > l. background-repeat:round round ; background-size: 10px 20px; These will not preserve aspect ratio because there are constraints on both dimensions. > Which of those preserves the image's intrinsic aspect ratio? See above. > Which of those preserves a 1:2 aspect ratio? None, afaict, unless the image's own aspect ratio is 1:2. > Which of those ignores aspect ratio when applying round (dimensions > are "rounded" independently after a pre-rounded size is computed)? jkl ignore the images aspect ratio. The others try to respect it, but will not preserve it exactly. ~fantasai
Received on Monday, 19 July 2010 19:47:24 UTC