[css-shapes] Using the rendered element as image source

While I was reviewing the css-shapes spec, I came accross this sample {see below} that I believe isn't very good practice because it's actually mixing content and styling by replicating the image source in the CSS styling.

  
    <img id="CSSlogo" src="CSS-logo1s.png"/>
    blah blah blah blah...
  <BR>
  
  <style>
    #CSSlogo {
      float: left;
      shape-outside: url("CSS-logo1s.png");
      shape-image-threshold: 0.1;
      shape-margin: 35px;
    }
  </style>

I'm also worried that the sizing of the image can be controlled by a "width" or a "height" declaration somewhere else in the CSS files and that the shape-outside algorithm might just end up working on the same image but with a different scaling factor, making the result incorrect.



Wouldn't it be a good idea to support

  <style>
    #CSSlogo {
      float: left;
      shape-outside: from-rendering; // and also "from-background"
      shape-image-threshold: 0.1;
      shape-margin: 35px;
    }
  </style>

? 

Are there perf issues or particular circular dependencies that make that hard to implement?


_________________________

PS: I envision "shape-inside: from-background" to be quite popular when "shape-inside" will become supported. 

PS2: Shouldn't "shape-margin" and "shape-image-threshould" be correctly namespaced as "shape-outside-margin" and "shape-outside-image-threshould"? 		 	   		  

Received on Thursday, 11 July 2013 16:07:38 UTC