Csswg-drafts: [css-overflow] add overflow-block and overflow-inline to support CSS Writing Modes

Created on 20 Nov 2017  路  11Comments  路  Source: w3c/csswg-drafts

Currently, neither css-overflow (https://drafts.csswg.org/css-overflow) nor css-logical (https://drafts.csswg.org/css-logical/) define a method for specifying values for the overflow property based on the current writing direction. Instead, you can only specify the overflow in terms of the X and Y axes. This is highly limiting when trying to adapt to a multi-locale environment where you may need to set overflow based on the direction of text flow.

Either in css-overflow or in css-logical (whichever is appropriate), there should be a definition for how to set overflow based on the text flow rather than strict X/Y directions.

Closed Accepted by CSSWG Resolution Commenter Satisfied css-overflow-3

Most helpful comment

It would also be nice if overflow accepted two keywords (one for each physical direction) and optionally a flow-relative switch (see #1282).

All 11 comments

It would also be nice if overflow accepted two keywords (one for each physical direction) and optionally a flow-relative switch (see #1282).

Obviously per the title of this issue, I think adding overflow-block and overflow-inline properties to CSS makes sense, given how other related properties are handled.

I agree though that supporting a syntax like the following would also be helpful:

overflow: relative? && [ <length> | <percentage> | auto ]{1,2}

(or logical instead of relative, whichever is settled upon in the end elsewhere in CSS-land)

Seems to me that this should go into css-logical (1 or 2, I don't care strongly). @fantasai @atanassov what do you think?

As for adding the relative or logical, I think it would be weird to do it only for overflow, and not for other shorthand properties that can have either physical or logical longhands. @a2sheppy, do you want to open a separate issue about that, or do you think there is a reason why this would need to exist for this but not for other properties?

@frivoal I think nobody suggested adding a flow-relative switch only for overflow. It's just that if flow-relative longhands are added for overflow, overflow syntax is changed to accept two values, and a flow-relative switch is added in #1282, then the switch should also work in overflow.

@Loirooriol I see, sorry for the misunderstanding. In that case, yes, I agree, and the only question left for me is which spec the logical longhands of overflow go to. I'd suggest css-logical over css-overflow, but I'm not stuck on that.

@frivoal I'm not sure which spec the logical longhands belong in either, although I think I lean toward css-logical as well. I'll file a ticket there and let y'all sort things out. :)

Actually, does issue #1282 already address this? It refers to margin but seems to be just using it as an example (since it says "margin-like" shorthands. Would that not include overflow?

@a2sheppy #1282 works for the addtion of the relative keyword, and this ticket works for the addition of the logical long hand. We're just waiting for an upcoming CSS-WG teleconference call to decide whether we agree (I expect we will), and which spec we put it in (I expect css-logical).

I think it should go in whichever of css-overflow or css-logical is the less stable specification. I think that's currently css-logical, but I'm not confident of that judgment.

It should go into css-overflow-3; css-logical-1 only defines stuff in earlier modules (e.g. CSS2.1), newer ones are expected to define their own logical equivalents. (I can't say that css-logical-1 and css-overflow-3 are particularly different wrt stability anyway. They both should be in CR, but need a bit of work / trimming down to get there.)

The Working Group just discussed [css-overflow] add overflow-block and overflow-inline to support CSS Writing Modes, and agreed to the following resolutions:

  • RESOLVED: add the writing direction dependant overflow values into CSS Overflow 3

The full IRC log of that discussion
<dael> Topic: [css-overflow] add overflow-block and overflow-inline to support CSS Writing Modes

<dael> github: https://github.com/w3c/csswg-drafts/issues/2000

<dael> fantasai: I think adding these properties makes a lot of sense. Just nee WG approval. I believe they should go into CSS Overflow L3.

<dael> Rossen_: I'm also in favor of this.

<dael> Rossen_: As to the draft...css logical is fine.

<dael> Rossen_: We currently have attempted to spec a bunch of properties with their logical behavior inside CSS Logical. That's kinda where we attempted to put all lgocial directions.

<dael> fantasai: That spec is b/c for most properties...they were in CSS 2.1 and there wasn't a css 3 draft with those properties. For scroll snap, though we put logical eq. in an appendix in spec.

<dael> Rossen_: Borders?

<dael> fantasai: Yeah, L3 was stabilized a long time ago so we couldn't change. L4 is expected to include logical keywords.

<dael> fantasai: Grid and Flexbox don't have physical eq.

<dael> Rossen_: So we can close I"m in favor of adding a spec fot he requested behavior. If this lives in overflow 3...yeah...css overflow 3 seems the better place.

<dael> astearns: Are you okay with L3 dbaron ?

<dael> dbaron: That makes overflow 3 depend on logical. As long as that's not an obstical I'm okay.

<dael> Rossen_: How about we deal with it when we get to it. WE see which pulls ahead. My intuition is logical is a bit of work, but not that much.

<dael> astearns: I'm in favor of putting it where it makes sense and if the race makes it problmeatic then we can deal with it. Predictions on spec progress are often wrong.

<dael> astearns: prop: add the writing direction dependant overflow values into CSS Overflow 3

<dael> astearns: Obj?

<dael> RESOLVED: add the writing direction dependant overflow values into CSS Overflow 3

Was this page helpful?
0 / 5 - 0 ratings