Loading ...
Sorry, an error occurred while loading the content.

Re: removing preserveAspect ratio on HTML object with src = SVG

Expand Messages
  • Tony Schreiner
    David, have you tried setting the height of the body and html elements to 100% as well? I believe what you are seeing is correct CSS 2.1 behavior, and is a
    Message 1 of 3 , Dec 5, 2011
    • 0 Attachment
      David, have you tried setting the height of the 'body' and 'html' elements
      to 100% as well?



      I believe what you are seeing is correct CSS 2.1 behavior, and is a place
      where Webkit is in the wrong. You should see the same behavior if you set a
      'div', 'iframe', etc. to 100% height so this isn't specific to SVG. You are
      right in assuming that if you set a width/height on the 'object' - and that
      height can be resolved - that it should override the aspect ratio computed
      from the viewBox in the SVG content.



      Note: In various browser's Quirks Mode you will see the same behavior as
      Webkit, but IE9 only supports SVG in IE9+ document mode so you don't want to
      do that.



      - Tony





      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.