Re: [csswg-drafts] [css-background-4] Issues with listifying border-color (#2532)

In my pull request to add `stripes()` I imagined it to be context sensitive, in contrast to 0-dimensional and 2-dimensional images.

@LeaVerou wrote in the PR:
> It has been a long time, but IIRC the resolution of these discussions, we would define 1 dimensional images, and `stripes()` would just produce a 1 dimensional image. Right now in CSS we have 2d images (gradients, urls etc), and 0 dimensional images (`image(<color>)`). I see that in this PR, `stripes()` is defined as its own type, and can only be used in properties that explicitly allow it. We'd like to be a bit more general than that.

@LeaVerou How do you imagine `stripes()` to work more generally and still cover the use case of multiline borders and outlines? How would painting 1-dimensional images be defined? Should it be also added to `<image>` like 0-dimensional images were via `image()`? If so, how would that work together with `border-color`?

I imagine `stripes()` or genereally 1-dimensional images to behave differently for different properties. I.e. regarding the use case of multiline borders the stripes are painted around the border.
Though in other contexts they may be interpreted differently. E.g. they could be used in a radial gradient as a replacement for the existing color stop syntax like `radial-gradient(stripes(red, yellow, lime, blue))` as an equivalent for `radial-gradient(red 25%, yellow 25%, yellow 50%, lime 50%, lime 75%, blue 75%)`.

If `stripes()` should be defined as an image (and by that be included in `<image>`), I'd rather add a way to define it in `border-image` / `border-image-source` and disable the slicing there.

Though in any case it still requires to define for each context how the stripes should be painted.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2532#issuecomment-1040238169 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 15 February 2022 12:54:09 UTC