- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Thu, 15 Mar 2012 17:08:27 -0700
- To: "L. David Baron" <dbaron@dbaron.org>
- Cc: www-style@w3.org
On Wed, Mar 14, 2012 at 1:58 PM, L. David Baron <dbaron@dbaron.org> wrote: > http://dev.w3.org/csswg/css3-images/#default-sizing (5.3, Default > Concrete Object Size Resolution) has a list with three cases. The > three cases would be exhaustive if the third one didn't have the > wording "and has no additional constraints". It's not clear to me > why this wording is present only in the third case; additional > constraints such as min-width and max-width can affect the results > of the first two cases as well. It seems like it would be better to > define all cases and then say what overrides that definition. It's > not at all clear to me that the interaction of these rules with > things like min-width and max-width is defined correctly. > > It also seems a little bothersome that these rules are then > overridden for the most important case by the following section > (5.4, Sizing Objects: the ‘object-fit’ property). Perhaps section > 5.3 should be split into two sections: > (a) the default sizing algorithm > (b) the definition of how the concrete object size is found for > things other than replaced elements (simply referencing that > algorithm) > > Then section 5.4 on 'object-fit' can become a parallel to (b) and > define how the algorithm is used for replaced elements, which also > involves defining how it interacts with min-width and max-width > (citing CSS 2.1, sections 10.4 and 10.7). I've substantially reworked this section now to address your comments. * "specified size" can now be a width/height *or* a contain/cover constraint. It can also have a rounding constraint in either dimension. This change lets specs directly lean on the algorithm for contain/cover stuff or the sort of sizing that background-repeat:round or border-image-repeat:round does, without having to redefine it themselves every time. * I've moved the list of 2.1 default object sizes to a subsection, and also added specified sizes for all of them. * I've addressed both sizing cases in 'border-image' - when the full image is originally sized, and when the slices are sized. * I've split the old "replaced elements" case into three, since it was wrong before. There's now a section for the 'content' property (non-replaced, which is all you can do in 2.1), a section for replaced elements (just calling out that they *dont'* use the sizing algorithm here, and pointing to CSS2.1 sections 10.4 and 10.7 instead), and then a section for the *contents* of replaced elements, hooking into 'object-fit'. * the default sizing algorithm has been expanded to deal with the cover/contain constraints and the rounding constraints that the specified size may have. The rounding behavior is a straight paraphrase of the text in B&B, so it should definitely be correct. * 'object-fit''s values have been reworded to just declare the "specified size" constraints they each provide. Please review these changes and let me know if you're satisfied with them. > It's also not clear to me why the influence of background-repeat: > round on background-size isn't just already taken into account in > the definition of "specified width". It now is, by simply defining that background-repeat adds a rounding constraint to the specified size. ~TJ
Received on Friday, 16 March 2012 00:09:16 UTC