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

> Yes, 1 dimensional images are still `<image>`.

I assume by that you mean to add `stripes()` to `<image>` but in properties like `border-color`, `outline-color` only `stripes()` is allowed, not the whole `<image>` syntax, right?

> The whole reason they are 1 dimensional is so they can be used in borders, and they are painted alongside the border (like a brush). I seem to also remember discussing something like how gradient functions would also be augmented to accept a 1d image as the gradient line, so you could do `linear-gradient(45deg, stripes(...))`.

Ok, so that sounds like we agree on this.

> I suppose we'd need to define some handling for when a 1d image is used raw in places that expect a 2d image. E.g. it could be converted to a 2d image via horizontal or vertical repetition (or stretching). 🤷🏽‍♀️

> There's no "natural" way to tile a 1d image into 2d; at minimum, vertical or horizontal tiling are both completely reasonable. We could choose one way arbitrarily if we wanted, I suppose.

Tiling or stretching sounds reasonable. Just to be clear we're on the same page here, I have two examples for a 100px by 100px image using `stripes(red, yellow, lime, blue)`:

Horizontal tiling:
![`stripes(red, yellow, lime, blue)` interpreted with horizontal tiling](https://user-images.githubusercontent.com/958943/154155035-6fb894aa-1382-454f-8f69-318c1d85b36e.png)

Vertical tiling:
![`stripes(red, yellow, lime, blue)` interpreted with vertical tiling](https://user-images.githubusercontent.com/958943/154155571-11bacdd1-b6b6-4461-998f-e202b8d7bef8.png)

Correct?

If so, I'd aim for the same behavior as for `linear-gradient()`, i.e. draw them from top to bottom, tiling (or stretching) them horizontally. This will also allow to use it in `linear-gradient()` as mentioned earlier without surprises.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2532#issuecomment-1040844549 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 22:07:27 UTC