W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

Re: [csswg-drafts] [css-multicol] image support for column rules (#5080)

From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
Date: Thu, 04 Jun 2020 20:06:52 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-639088006-1591301211-sysbot+gh@w3.org>
> **Additional Questions**
> 
> * What happens when your image is wider than the row or column gap? Can you tell the image to overlay on top of the elements or below? Should the user be able to control how it overlays or should it only be considered as a background-image?

I guess @MatsPalmgren's suggested border-image-like representation clips wider images to the gap area. Though that would be influenced by `column-rule-image-width` and `column-rule-image-outset`, so yes, that needs to be defined.

> For instance, let's say you have a Pinterest board and when you pin an item you want to highlight that row and have an icon appear beside it that also overlaps the element.
> 
> * What if you wanted to be able to visualize each row or column that a grid element spans? With this you cannot tell if the first column is 1 col wide or potentially 5 cols wide unless this is intended to show every column that isn't spanned by an element.
> 
> * What if you wanted to do an alignment? Left, right, middle within the column or row?

I am not totally sure regarding some of those questions, but I _think_ all of them rather go in the direction of being able to style _grid areas_, which is discussed in #4416, and not the gaps.

> What if you wanted an alignment within the row/column gap?

That could be achieved by having the alignment within the image, but what are the use cases for different alignments than centering?

>     * Does this also work with nested grids?

Using subgrids I'd say so, though it needs to be defined how they behave.
> 
>     * Is there a way to control which items get row/grid lines. For instance:
> 
> 
> ```
> item   |   item   |   item
> ----------------------------
> blankblank....... |   item
> ```
> 
> Or in the case where you want it only on a single item in the row:
> 
> ```
> item | item | item
>             ------
>             | item
> ```
> 
> Or in between two items:
> 
> ```
> item | item | item
> ---------------------
>      | item |
> ```
> 
> Or for another example:
> 
> ```
> item | item | item
>      -------
>      | item |
> ```

Regarding those examples, it seems to be a question of whether to always draw the rules or only between items. And I agree that both may have use cases.

One use case for a having the rules be drawn when they don't have adjacent content can be seen at https://sea-visualcommunication.design/uploads/9/8/6/6/98662420/cn-07112018-a01_orig.jpg.

> ### Sebastian, to your point:
> 
> > When rules are overlapping, it needs to be defined whether the horizontal or the vertical rules are painted last, and if that is also something that should be controllable by authors.
> 
> Could this be determined by setting a z-index value?

To be able to set a `z-index`, the gaps would need to be defined as pseudo-elements. The current proposal goes a different way and defines the gaps via properties. So in order to allow controlling which one is painted last a new property would need to be defined that specifically does that.
But there's still the question of whether there are use cases for being able to control that.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5080#issuecomment-639088006 using your GitHub account
Received on Thursday, 4 June 2020 20:06:58 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:27 UTC