Re: [idea] lighweight inline vector images in CSS and HTML

Andrew Fedoniouk skrev:
> SVG paths are OK in general but they do not support "expandable"
> images - images that fill given area by not just uniformly scaling but  
> having points anchored not just to left/top but to right/bottom.
>
> By achieving "expandability" I've extended original "d-command" syntax
> a bit:
> All "absolute" commands (uppercase ones:  MLHVCSQTA) when given
> negative coordinates use those as offset from right and bottom sides
> of image box:
>
> Consider this style: 
>
>     section > div {
>         background-image: url(path:M0,-0 C10,-0,10,0,20,0 L-20,0
> C-10,0,-10,-0,-0,-0);
>         background-repeat:no-repeat;
>         background-size:100% 100%;
>         fill:gold;
>         stroke:#444;
>         stroke-width:0.5px;
>         width:max-content;
>         padding:4px 25px;
>         margin:5px;
>         outline:1px dashed #aaa;
>       } 
>  
> It defines expandable "bell-tab" curve. ...
> - 
> Andrew Fedoniouk.
>
> http://sciter.com
It's valid for a SVG path to extend into the negative coordinate space.
Giving negative coordinates special treatment would be a bad idea. You'd
need a different marker.

Received on Sunday, 20 March 2016 10:17:21 UTC