Intrinsic Ratio/Height for <object>

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Intrinsic Ratio/Height for <object>

Chris Hubick
Hi,

I reported bug 70978 over 5 years ago:
https://bugzilla.mozilla.org/show_bug.cgi?id=70978

As I just commented there, I believe the behavior I am asking for is
specified in section 10.6.2 of the CSS 2.1 draft at:
http://www.w3.org/TR/2006/WD-CSS21-20060411/visudet.html#inline-replaced-height

Re: "block-level replaced elements in normal flow":

If 'height' has a computed value of 'auto' and 'width' has some other
computed value, and the replaced element has an intrinsic ratio, ... then
the used value of 'height' is: (used width) / (intrinsic ratio)".

Does anyone know:
a) Will the reflow branch finally fix this?
b) Is there a CSS test for this functionality? (does Acid2 test for this
by chance?)

Reasoning/Goal: As I wrote in my test case (
https://bugzilla.mozilla.org/attachment.cgi?id=218888 ), I want to include
an SVG banner on a website that will scale properly when displayed on a 2"
Cell Phone screen or 30" Desktop LCD - I can specify a width of 80% of the
page, but there is then no way to specify a height that will maintain the
SVG image's proper intrinsic perspective. This unconstrained intrinsic
perspective resizing does work for bitmap images. It seems to me that
scalable graphics support is useless without a way to effectively utilize
that scalability in the browser+html.

Thanks!

--
Chris Hubick
mailto:[hidden email]
http://www.hubick.com/

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout
Reply | Threaded
Open this post in threaded view
|

Re: Intrinsic Ratio/Height for <object>

L. David Baron
On Wednesday 2006-05-03 15:57 -0600, Chris Hubick wrote:
> As I just commented there, I believe the behavior I am asking for is
> specified in section 10.6.2 of the CSS 2.1 draft at:
> http://www.w3.org/TR/2006/WD-CSS21-20060411/visudet.html#inline-replaced-height
>
> Re: "block-level replaced elements in normal flow":
>
> If 'height' has a computed value of 'auto' and 'width' has some other
> computed value, and the replaced element has an intrinsic ratio, ... then
> the used value of 'height' is: (used width) / (intrinsic ratio)".

It's worth noting that this part of the spec is very new and is still
changing slightly with each draft.  I think there have still been
discussions in the working group about it, so I'm not sure it's quite
stable enough for implementation.

> a) Will the reflow branch finally fix this?

No.

> b) Is there a CSS test for this functionality? (does Acid2 test for this
> by chance?)

Acid2 doesn't; I doubt there are any tests in the W3C CSS2.1 test suite
for it yet either.

> perspective resizing does work for bitmap images. It seems to me that
> scalable graphics support is useless without a way to effectively utilize
> that scalability in the browser+html.

Yep, that's why this bit of the spec has been worked on recently; once
it's stable I think it's something we should implement.  (That said,
don't hold your breath for having it implemented for plugins.)

-David

--
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Intrinsic Ratio/Height for <object>

Boris Zbarsky
In reply to this post by Chris Hubick
Chris Hubick wrote:
> a) Will the reflow branch finally fix this?

Not necessarily.  To properly fix sizing of block-level images we might end up
having to somewhat fix this (or at least take some steps in the direction of
fixing it). See my previous post about "block-level replaced element margins".

> b) Is there a CSS test for this functionality? (does Acid2 test for this
> by chance?)

Probably, and no in that order.

-Boris
_______________________________________________
dev-tech-layout mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-layout