W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: Clipping a border-image

From: Bert Bos <bert@w3.org>
Date: Wed, 16 Apr 2008 11:24:16 +0200
To: www-style@w3.org
Message-Id: <200804161124.16547.bert@w3.org>

[I think Dave Hyatt has started seeing every problem as a variant of a 
clip mask :-) ]

On Tuesday 15 April 2008 23:46, David Hyatt wrote:
> I raised an issue a while back about not being able to clip out the
> center of a border-image.  It's wasteful that this part always draws.
> I was thinking that another cool feature for border-image would be if
> you could clip the border-image to the actual strokes being drawn.

When would that be useful? The only border style that is predictable 
enough is 'solid'. Why would you clip to the strokes of a 'dotted' 
or 'double' border, instead of drawing your own dots in the border 
image? (Drawing to the actual strokes when the 'border-radius' is 
non-zero is also not very helpful, because of the disappearing 
corners.)

>
> A single clip keyword could cover both cases, either via a new
> property, border-image-clip, or just as an optional part of the
> border- image declaration.  Clipping to the shape of the original
> border stroke would take care of my desire to clip out the middle and
> also open up a nice range of options for border-image.

In terms of syntax, another keyword would not be very difficult. But 
still I think this is feature creep. The cost of adding it (in terms of 
implementation and testing, but especially of learning, teaching and 
remembering) is too high compared to the benefit.

When you create the image in Photoshop or Illustrator, you can cut out 
the middle part (or just never draw anything there in the first place). 
Nothing new to learn.


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Wednesday, 16 April 2008 09:24:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:05 GMT