W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css3-background] border-image-slice %age values

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 16 Sep 2010 08:32:19 -0700
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <E11E9349-69CD-4818-92A8-17393CD1A10E@gmail.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>

On Sep 16, 2010, at 12:16 AM, Daniel Glazman wrote:

> Currently implementing border-image in BlueGriffon, I have a question
> relative to border-image-slice. I don't understand the use case for
> percentages inside border-image-slice values. They also drastically
> complexify the implementation of a wysiwyg UI for this property.
> It seems to me that pixels (as <number> in the spec) are enough
> since this property is likely to be always applied to bitmap images
> easily controllable at pixel-level by the web author, or vectorial
> images with a default viewport setting giving it again a bitmap
> representation.

It could also be applied to a linear angle gradient (and similar), which is a dimensionless image, and which might only be using percentages in it's color stops. That pretty much demands using percentages for border-image-slice, I think.

> I understand %ages could be useful to use SVG images entirely drawn
> using #ages as border images but the resulting complexity in wysiwyg
> editors seems to me overkill.

I just watched your video of how you do the UI in BlueGriffon. Very nice (and my, what a big foot).  It seems that you could have a small "%" button to the left of each up/down incrementer control, so that when clicked to be un-grayed (or clicked to switch between showing a "px" and showing a "%", or clicked to be a "pushed in" button, or something), it converts between a percentage and image pixels. That could be small enough to fit in there nicely without too much extra UI complexity. Or you could have a second field under each "slicing" field that is percentages (where either field changes automatically with any change to the other one), and a radio button to choose whether the number or the percentage should be used. Anyway, just a couple suggestions. 

You could always leave it out of your UI if you don't think your users really need it often enough to warrant the added complexity. I'm not too familiar with BlueGriffon, but seeing your linear gradient video it looks like it can't necessarily represent any arbitrary styling that might exist in an HTML file anyway (since linear-gradient and maybe other background-images seem to require an ID selector). Is that correct?
Received on Thursday, 16 September 2010 15:32:56 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:49:47 UTC