Re: fill and stroke properties with CSS <image> values

On Jan 24, 2014, at 2:52 AM, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Wed, Jan 22, 2014 at 10:18 PM, Dirk Schulze <dschulze@adobe.com> wrote:
> fill/stroke = <final-bg-layer> | <the-rest>
> <final-bg-layer> = <image> || <position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box>{1,2} || <color>
> 
> Please don't support <attachment> here. It's tricky to implement, and it's probably useless here.

It is for sure a bit more challenging but on the other hand not that much harder.

I saw a couple of web pages using -webkit-background-clip: text in combination with attached background images. When you scroll the text, the fill of the text stays in the same position while the text moves. This use case can not be archived declaratively with fill/stroke without attachment (for HTML content).

There might just be one possible way to still archive attached paint sources. If we add ‘viewport’ as keyword to <bg-size> and <position>, and the keyword would follow the CSS interpretation of viewport for HTML content (instead of the SVG one), then the paint source would be attached and size relative to the viewport. I am not sure how much of a help that is if you do not want to scale your paint source across the whole window area. That would probably still just be possible with either <attachment> on fill/stroke, -webkit-background-clip: text; or script.

I personally am not a friend of -webkit-background-clip: text, since >80% of the use cases are filling a text with an image or gradient.

Greetings,
Dirk


> 
> Rob
> -- 
> Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr, 'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp  waanndt  wyeonut  thoo mken.o w  

Received on Saturday, 25 January 2014 11:25:35 UTC