- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Thu, 19 Jan 2006 19:55:49 -0800
- To: "L. David Baron" <dbaron@dbaron.org>, <www-style@w3.org>
Thanks, David, but see my comments below. ----- Original Message ----- From: "L. David Baron" <dbaron@dbaron.org> >On Thursday 2006-01-19 17:33 -0800, Andrew Fedoniouk wrote: >> >> ----- Original Message ----- >> From: "L. David Baron" <dbaron@dbaron.org> >> >> > http://dbaron.org/css/css-vg/ >> >(see section 2, Gradients and Patterns). >> >> David, is this >> >> @fill logoback { >> gradient: 90deg red blue; >> } >> >> #logo { >> background-color: fill(logoback); >> } >> >> in principle better than function style defintion like: >> >> background-draw-method: >> gradient-fill( angle: 90deg, color1: red, color2: blue ); >> >> ? If yes than why in your opinion? > >It has at least the following advantages: > * it is reusable across all drawing operations, not just backgrounds, > without an explosion of new properties Good one. But what kind of operations assumed other than background? Probably borders and foreground images? I have some doubts though about value of such e.g. gradient methods for borders. Borders require their own set of methods/functions. > * it is reusable across multiple CSS rules True, but the same result could be achived with multiple class declarations for elements or trivial inheritance. .logo { gradient-fill( angle: 90deg, color1: red, color2: blue ); } <h2 class="logo and-something-else">... > * it allows multiple layers (which is what started this discussion in > the first place) a) I cannot see how function style will prevent such implementation. b) If multiple layers needed at all... so far all examples are related to emulation of complex border drawing. I beleive it is better to provide background-draw-method: expandable-fill( image: url(...), margin-left: 4, margin-right: 3, ... ); as a single function than multiple layers with multiple unknowns. c) The only layer I would add is foreground. img { foreground-draw-method: stretch( image: url(...) ); } This by the way will finally allow to define html <IMG> rendering by CSS rules. > * it allows fallback if required images fail to load > Function notation allow you to do this too: background-draw-method: expandable-fill( image: url(...), margin-left: 4, margin-right: 3, ... ), gradient-fill( angle: 90deg, color1: red, color2: blue ), solid-fill( color: red ); and finaly fallback to background-color: red; For me @fill logoback { gradient: 90deg red blue; } / fill( logoback ) seems like an inderect form of function call notation. Little bit unusal and redundant I would say. And it requires use of names ("logoback") with all possible implications like name collisions, etc. Andrew Fedoniouk. http://terrainformatica.com
Received on Friday, 20 January 2006 03:55:56 UTC