- From: Lea Verou <leaverou@gmail.com>
- Date: Tue, 17 Apr 2012 03:54:48 -0700
- To: Rik Cabanier <cabanier@gmail.com>
- CC: "public-fx@w3.org" <public-fx@w3.org>
- Message-ID: <4F8D4BF8.6030205@gmail.com>
Lea Verou (http://lea.verou.me | @LeaVerou) On 16/4/12 10:11, Rik Cabanier wrote: > Hi Lea, > > It is very powerful. If this feature were available, there would be > places where people could get pre-canned effects so they wouldn't have > to learn it. > There could even be tools to create this code... I'm not saying it shouldn't exist, just that it shouldn't become an excuse for avoiding simpler syntax for more common effects. CSS is primarily meant to be written by humans and I don't think anyone here would want that to change. > > You are asking for an advanced feature so the syntax will be fairly > complex unless you want JUST blurring of your background (in which > case a new blending keyword would suffice) but this would not result > in the appearance of your examples. How so? It seems to me that it would be sufficient, but perhaps I'm not noticing some finer details. However, even in that case I don't think those finer details are necessary, especially since they can always be added later or done with a shader. If I'm not mistaken, the purpose of these shortcuts is to simplify common cases, since the proposals include extension points for the most complex ones (e.g. shaders). > My proposal was to extend blend-mode to: > > blendmode(filter chain on background, filter chain on source) > > > Maybe compositing would work here too: > > alpha-compositing(filter chain on background, filter chain on source) > > > The second parameter could be optional so only a filter on the > background is applied, the syntax then becomes. > > blend-mode: color-burn(blur(5px)) > > or > > alpha-compositing: src-over(blur(5px)) > Isn't "filter chain on source" exactly what the `filter` property is for? Perhaps a new property is needed, to apply a chain of filters to the backdrop. Then, by combining blending modes, filters and the new property, more complex effects could be achieved, while keeping it simple for more basic cases. Is this already possible in SVG somehow? Btw, you are using "background" to refer to an element's backdrop. This is also happening in the compositing proposal. The same thing is referred to as both "background" and "backdrop" and they are even explicitly declared synonymous in the prose (section 3). However, "background" has a very specific meaning in CSS already. Using the term to refer to two different things is very confusing. Can we stick to "backdrop", please? > > This need to be done with the background. For example if you want to > implement something like the Win7 window, a window would be 1 element > that contains other elements that implement menu bars, folder view, > file view, etc. The window has a blurred background but the other > views don't so only the background of the element has this effect > applied to it. What I suggested only affects the backdrop, not the element itself. If the element does not have transparent or semi-transparent parts it would make no difference. I guess in that sense it's quite different from blending modes.
Received on Tuesday, 17 April 2012 10:55:24 UTC