Re: [csswg-drafts] [css-tables] Let `*-gap` properties apply to tables (#4848)

> 2\. If the answer is yes, would adding “gap” behavior to table be meaningful and desirable?

As an author, I'd say that's definitely desirable for consistency and simpler behavior. And it would also open up the way for features like [gap styling](https://github.com/w3c/csswg-drafts/issues/2748).

> 2\. a. One reason why it could be undesirable is that “gap” behavior would not insert spacing between the border of the table and the border of the first cells of the tracks.

As mentioned in my last comment, from an author's point of view, this is not really a disadvantage because the effect can still be achieved via `padding`.

> 3\. If the answer is yes, we would be discussing details about the proposal:
> a. How to resolve percentages?
> \- Should we only enable them on tables with explicit width and treat them as 0% otherwise?

I guess, authors would expect the same behavior as for other layout types, i.e. they should always apply. If they only applied under certain conditions, it very likely will cause confusion.

> b. How to resolve the conflict with `border-spacing`?
> \- Should the effects override each other?
> \- Should the effects stack?

I slightly tend to let `gap` overwrite `border-spacing`. The reason for that is that against the [definition of `0px 0px` in the spec.](https://drafts.csswg.org/csswg-drafts/css-tables-3/#border-spacing-property), the initial value in browsers is `2px 2px`. So if you want to use `gap` and don't want them to stack, you also have to set `border-spacing: 0;`. Though I don't have a strong opinion on that.

In any case, web compatibility should be checked. Maybe there are already some pages setting `gap` on tables, which would cause layout changes once it applies.

Sebastian

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


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

Received on Thursday, 15 September 2022 06:45:32 UTC