Re: [css3-background] box-shadow spread Multiple Choice Question

On Jun 8, 2010, at 7:16 PM, Brian Manthos wrote:

> Brad Kemper:
>> You mean, use a transparent border, or add a wrapper element with padding
>> and shadow that instead? Yeah, a hack like that would work too, as a
>> roundabout way to get a true spread effect (what you call Photoshop-
>> esque).

I forgot to mention that you'd probably also need negative margins to compensate for the invisible border being added solely for the spread.It'd  be pretty darn hacky, all-in-all.

>> 
>> But why? There is no visual advantage to simulating the spead via scaling. The
>> end result does not look like a scaled shadow unless the element is perfectly
>> square, because the UA would scale differently for the horizontal than the
>> vertical in order to bring the edges out to where they would be if it was an
>> outset. It ends up looking like just almost-spread, with distorted curves and
>> heavy spots in the corners. They question should really be if this is good
>> enough if the UA were to do that as a speed optimization, and not about this
>> being the best solution. I just feel it is absurd to say that the most distorted
>> version of fake-outset is better looking than the actual outset.
> 
> Overall, I haven't expressed an opinion on the listed options (1, 2, 2a, etc.) because I'm still mulling it over.
> 
> While it's often a useful spec friction reduction tactic, I generally find "allow UAs to do a lower quality rendering for speed" troubling.  It's a cheat that means we lose testability and interoperability -- and it means the hard-core artists will just do bitmaps anyway because they value their design over UA optimization variations.
> 
> With the line of questioning here, I was just trying to get a feel for the author pain with losing box-shadow as discussed in your previous posts (last week/month, whenever it was we had that thread).  If they can get the *identical* desired affect -- regardless of UA-varied optimizations -- by leveraging multiple element workarounds, then at least they don't have to resort to bitmaps so I'm slightly less bothered by the "allow" options.   The availability of workarounds also makes option 5 less painful.

OK, I understand. Keep in mind, for the typical use case, there will be blur too.  I would expect that typically there would probably be more blur than spread, or at least somewhere in that neighborhood. So for those, the degradation in quality might be good enough. But if you are using box-shadow with spread to fake a second or third border around the first, then it most likely would _not_ be good enough (actually, that would be more like an outline than a border). For the record, I am not against such creative "off label" uses, but that's not what box-shadow or spread are for, and that should not influence how we spec it. 

Hmm. Outlines. Those really should follow the curve of the corners too.

Received on Wednesday, 9 June 2010 02:48:42 UTC