Re: RFC: ability to assign images to corners

--- Bert Bos <bert@w3.org> wrote:

> At the last meeting the CSS WG had, we looked at
> some books in Art
> Deco style. You may have seen these very elaborate
> floral and other
> patterns. They often consist of a flower or a leaf
> that is repeated
> and the repeated pieces are designed such that they
> connect nicely
> together.
> 
> A 1-pixel image would clearly not be enough for
> those.
> 
> Also, we saw that many borders actually have 5
> parts: the corners, a
> center piece and two tiled parts (often the two
> tiles are each other's
> mirror image):
> 
>     @@////////////////(*)\\\\\\\\\\\\\\\\@@
>     //                                   \\
>     //                                   \\
>     //                                   \\
>     //                                   \\
>     ~~                                   ~~
>     \\                                   // 
>     \\                                   // 
>     \\                                   // 
>     \\                                   // 
>     @@\\\\\\\\\\\\\\\\(*)////////////////@@
> 
> Some edges consisted of a single image that was
> stretched as needed:
> 
>      - - -- -- ---===###===--- -- -- - -  
>    :                                     :
>    :                                     :
>      - - -- -- ---===###===--- -- -- - -  
> 
> We also looked at some of the built-in border styles
> of (Japanese)
> cell phones. They have wavy lines and other patterns
> in two or three
> colors.
> 
> Color brings up another interesting complication: if
> the border is
> polychrome, it is usually OK if it comes with it own
> colors, as a PNG
> image, for example. But when the border is
> monochrome, you might want
> the same pattern to be used with different
> foreground and background
> colors, to match the element's text.
> 
> Cropping is a problem, too, because then the tile
> connects correctly
> to one corner piece, but not to the other corner.
> 
> We also have to consider borders in tables, which
> can use the same
> styles, but have corners that connect to 1, 2, 3, or
> 4 edges.
> 
> Note that we already prepared somewhat for these
> borders, by adding a
> property to the Background module to keep the
> background away from the
> border: 'background-clip'
> 

I read this and the first thing that enters into my
mind is the question: is this css or should this be in
osme other spec like svg?  If the border was an svg
object, it seems that might simplify the css syntax
somewhat.  

I'm sure the WG has thoughts on this, and would like
to include as much into css as possible without making
it too complex.  I'm having trouble deciding where the
crossover is between style and data

For overlap between svg and css, it would be nice to
try and use similar conventions.  For example, svg has
an x and y radius for corners of a rectangle, though
this assumes all four corners to be symmetrical. 
mozilla implements -moz-border-radius with radii for
each of the four corners, which thus assumes always
circular, but not necessarily symmetrical.  

Thanks for the description of the borders from the
last WG meeting... I think it opened a lot of eyes,
and will also raise a lot more interest with this
idea.

-Dylan Schiemann
http://www.sitepen.com/
http://www.dylanschiemann.com/

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

Received on Thursday, 21 February 2002 16:22:59 UTC