W3C home > Mailing lists > Public > www-style@w3.org > March 2013

RE: The :min-width/:max-width pseudo-classes

From: François REMY <francois.remy.dev@outlook.com>
Date: Sat, 30 Mar 2013 13:49:52 +0100
Message-ID: <DUB120-W2291D177923DC767435A12A5DC0@phx.gbl>
To: Elliott Sprehn <esprehn@gmail.com>, Tab Atkins Jr. <jackalmage@gmail.com>
CC: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
Hi,

I'm still trying to understand how exactly the <viewport> 'layout-ancestors-to-layout-childs' model is problematic. I may be wrong but it seems to me that

  <div style="width: calc(50% + 1em + 1vh)">
    <div style="width: calc(50% + 1em + 1vh)">
      Some content
    </div>
  </div>

already requires that you compute the layout of the parent div before you can compute the layout of the inner one, right? In my mental model, I don't see how this is so different in the case of :min-width. 


While I'm asking layout questions, can I also ask how browsers are able to get min-content and percentages working properly inside each other?

  <div style='width: 50%; background: blue;'>
    <div style='width: -webkit-min-content; background: red;'>
      <div style='width: 50%; background: yellow;'>
        Some content
      </div>
    </div>
  </div>

Does it imply two successive relayouts (one where percentages are treated as 0, and then another one where they are resolved against the previously detemined value for min-content)? Does it means I can get <iframe seamless>-like 2^n relayouts where n is the number of nested min-content elements?


Best regards,
François 		 	   		  
Received on Saturday, 30 March 2013 12:50:21 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 30 March 2013 12:50:22 UTC