- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 30 Nov 2010 13:44:33 -0800
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Leif Arne Storset <lstorset@opera.com>, Rik Cabanier <cabanier@adobe.com>, www-style list <www-style@w3.org>
On Tue, Nov 30, 2010 at 1:22 PM, Brad Kemper <brad.kemper@gmail.com> wrote: >> On Tue, Nov 30, 2010 at 9:42 AM, Brad Kemper <brad.kemper@gmail.com> wrote: There's some communication mismatch here - I'm not saying what you think I'm saying. I'll address each point in turn. >> Background-repeat really just >> describes how to transform a finite-size background image into an >> infinite background layer. > > Gradient images can be finite sized, via 'background-size'. Gradients are always finite-sized. All images are, after the size negotiation step happens; some images, like gradients, just have paint outside of their defined sizes. background-repeat is applied after image size negotiation. background-size affects the size-negotiation algorithm (it should change the 'default image sizing area', though I haven't specced that yet), but that's not relevant for our purposes here. >> For raster images the only sensible >> options are to do nothing (transparent everywhere outside the view >> box) or to tile it in some way (we chose simple tiling in one or both >> directions). Gradients theoretically have infinite paint, so >> background-repeat:extend needs to be defined to give the option "just >> use the rest of the image outside of the view box". > > Yes, and that effect would be fine for 'background-repeat:no-repeat', if we thing we would never need it to not extend, or a new 'background-repeat:extend' if we want to have it optional. But I see no reason why this should exclude the other 'background-repeat' values if the image is sized down to something less than '100% 100%'. I don't understand what you're trying to say here, and so expect that we're talking past each other. background-repeat:extend will make the gradient fill the entire background layer with its paint. This is obviously mutually exclusive with tiling the gradient to fill the background layer. Resizing the image via background-size just changes the default image sizing area, and thus the way the gradient draws itself. It's irrelevant when considering how to fill the rest of the background layer. >> Whether or not a gradient repeats, though, has nothing to do with the >> above. > > Why not? You're saying the values for 'background-repeat' and/or 'background-size' should be ignored when you don't have 'background-repeat:extend'?? I have no idea what you're trying to ask me here, likely due to talking past each other in the previous paragraph. >> It's purely a function of the color-stops. > > Not purely, since a background image can be repeated. For multiples of 90deg, you don't even need anything special to make it look good. Background images can be tiled with background-repeat, yes. By a happy coincidence, you can simulate a repeating linear gradient using background-repeat, when the gradient is angled at a multiple of 90deg. That has no bearing on the general problem of a repeating gradient. >> You can have a >> normal gradient with background-repeat of none, repeat, or extend. > > That contradicts your previous two statements about repeats of gradients only being in the color stops, and having nothing to do with tiling via background-repeat. And what happened to repeat-x, repeat-y, round, and space? These should all continue to work if background-size is small enough. No it doesn't; I suspect the previous confusion of causing trouble here. I omitted the other background-repeat values for brevity; obviously they all apply equally well. >> You can similarly have a repeating gradient with any of those. > > OK... and it looks good for horizontal and vertical gradients. I don't see how anything you've said refutes the thing you quoted me on, where I argue that some further monkeying with 'background-repeat' could also make tiled diagonal gradient images look good too. Same as above. >> If we decide that using gradients for things like a corduroy texture >> are sufficient to introduce repeating gradients, then I suspect we'd >> want to allow this for border-image as well as background-image, > > The circumstances in which you could satisfactorily use a *-gradient as a background-image are extremely limited. Most of the time it'd be easier to just use two backgrounds, unless you _really_ need a hole cut in the middle instead of just simulating that with another background layer. It's not worth it to complicate the syntax just for that. Did you mean border-image here? Even if you did, I don't understand what you're trying to say here. How does using two images solve the problem of wanting a corduroy pattern for your border-image? >> not >> to mention filters. > > Which we haven't seen yet, and so can't evaluate how much this would be needed there. Again, let's please start with the simplest syntaxes for the images, and only add to them as needed. Building gradient-specific behavior into the background-* properties isn't compatible with later tinkering directly in the gradient, though. We really do need to decide one way or another right now. ~TJ
Received on Tuesday, 30 November 2010 21:45:26 UTC