W3C home > Mailing lists > Public > www-style@w3.org > December 2012

Re: Media feature based on parent width instead of viewport/device width

From: Ben Callahan <ben@heysparkbox.com>
Date: Mon, 17 Dec 2012 11:47:51 -0500
Message-ID: <CADcYynRCyWx5w=e=My3QvWjbZSXH753dMv7TWg_2mKuPXCqQGA@mail.gmail.com>
To: www-style list <www-style@w3.org>
Don't want to push too hard, but is the fact that someone *could* create an
infinite loop a valid reason to not implement this kind of thing? I would
be ultimately frustrated if, say, JavaScript didn't allow me to modify the
counter inside a loop in the name of preventing bad code. Truth is, people
can (and will) write bad code in any language...

Just a thought,
Ben


On Mon, Dec 17, 2012 at 11:32 AM, Ben Callahan <ben@heysparkbox.com> wrote:

> Thanks for the explanation guys. I'll keep thinking on this in hopes that
> we can solve it somehow.
>
> Cheers,
> b
>
>
> On Mon, Dec 17, 2012 at 10:44 AM, François REMY <
> francois.remy.dev@outlook.com> wrote:
>
>> |  ...
>> |
>>
>> <thinking about a "sticky post" on the ML / on a blog somewhere about the
>> general pitfalls of CSS or why your favorite feature may not be doable in
>> CSS right now; the property-selector dependency would certainly make the
>> cut for that>
>>
>>
>>
>> |  It's possible in the future that we may be able to add a more
>> |  restricted form of layout that can have this kind of interdependency
>> |  (its simplicity might make cycle detection + breaking more tractable),
>> |  but it won't allow arbitrary constraints.
>>
>> To be more concrete, I've an (unproposed) proposal that would enable
>> authors to create "local viewports" (display: viewport). One of the goals
>> of local viewports will be to allow those kinds of usage. However, I agree
>> with Tab that what you're going to win at one side, you're going to loose
>> it on the other one: to introduce more freedom to the author, we introduce
>> more constraints for the layout engine; there doesn't exist a "perfect"
>> solution to this problem.
>>
>> Specifically, the current layout algorithms are made such that the layout
>> of the children affect the layout of the parent; if we want the layout of
>> the children to depend on the size of the parent, we need the size of the
>> parent to be independant of the layout of the children. From a performance
>> point of view, the case where the layout of the parent doesn't depend on
>> the layout of the children is very interesting (particulary in the case of
>> ininitely scrollable lists), which is one of the other motivations for this
>> proposal.
>>
>>
>> Best regards,
>> François
>>
>
>


-- 
*
Ben Callahan
*
*
Sparkbox, President
*
*
*

411 East Fifth Street

Dayton, OH 45402

office  937 401 0915

fax  877 253 6954
www.seesparkbox.com
Received on Monday, 17 December 2012 16:48:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:03 GMT