Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

[css-logical] Add block-start and block-end to caption-side #9623

Open

Description

@SebastianZ

CSS Logical says

The existing top and bottom values are idiosyncratically redefined as assigning to the block-start and block-end sides of the table, respectively.

regarding the caption-side keywords.

For consistency - also because the spec. defines inline-start and inline-end - we should define the keywords block-start and block-end explicitly and let the physical values map to them.

@ramiy already created a PR to add them.

Sebastian

Activity

  1. Loirooriol commented on Nov 22, 2023

    @Loirooriol
    Contributor

    If they don't bring any new functionality, I'm not convinced this is worth it.

    That said, it's maybe a bit strange for top and bottom to be flow-relative, while left and right are line-relative:

    Keyword Type Meaning
    top, bottom flow-relative block-start, block-end
    left, right line-relative line-left, line-right
    inline-start, inline-end flow-relative inline-start, inline-end

    If compat allows it, it could make more sense to treat top and bottom as line-over and line-under, and then add block-start and block-end as flow-relative:

    Keyword Type Meaning
    top, bottom line-relative line-over, line-under
    left, right line-relative line-left, line-right
    inline-start, inline-end flow-relative inline-start, inline-end
    block-start, block-end flow-relative block-start, block-end

    If the initial value is also changed to block-start, then this would only impact pages explicitly setting caption-side: top or bottom in a writing-mode: vertical-lr (or non-standard horizontal-bt in WebKit).

  2. Loirooriol commented on Nov 22, 2023

    @Loirooriol
    Contributor
  3. SebastianZ commented on Nov 24, 2023

    @SebastianZ
    ContributorAuthor

    That said, it's maybe a bit strange for top and bottom to be flow-relative, while left and right are line-relative:

    Thanks for pointing out that inconsistency!

    If compat allows it, it could make more sense to treat top and bottom as line-over and line-under, and then add block-start and block-end as flow-relative

    I agree with that. Doing so, authors have the freedom to choose between flow- or line-relative alignment for their caption. (Though I have to say, I lack the knowledge of vertical and RTL languages and their requirements.)

    If the initial value is also changed to block-start, then this would only impact pages explicitly setting caption-side: top or bottom in a writing-mode: vertical-lr (or non-standard horizontal-bt in WebKit).

    That needs to be checked for web compat. And if pages exist, the question is whether that new initial value would actually be better in those cases.

    Sebastian

  4. Loirooriol commented on Nov 24, 2023

    @Loirooriol
    Contributor

    On the other hand, given that nobody seems to implement left and right (I think only Firefox did, but no longer), and thus they don't implement inline-start and inline-end either, we could just remove all of these. Then there is no inconsistency.

  5. SebastianZ commented on Nov 24, 2023

    @SebastianZ
    ContributorAuthor

    Removing them is also an option if they are really not implemented anywhere anymore/it is web compatible and there are no strong use cases for adding them back.

    Sebastian

  6. ramiy commented on Nov 27, 2023

    @ramiy

    On the other hand, given that nobody seems to implement left and right (I think only Firefox did, but no longer), and thus they don't implement inline-start and inline-end either, we could just remove all of these. Then there is no inconsistency.

    Not sure that removing inline-start & inline-end values to prevent inconsistency is the best approach.

    Removing them is also an option if they are really not implemented anywhere anymore/it is web compatible and there are no strong use cases for adding them back.

    I suggested this feature for Interop 2024, therefore browsers may add support for this feature and improve web compatibility.

    As for use cases, I see a lot of use cases for this feature. For example, caption position may add more possibilities to CSS frameworks like Charts.css which relies on HTML tables.

  7. ramiy commented on Nov 29, 2023

    @ramiy

    In addition, the current spec mentions that:

    The mapping on this property uses the writing mode of the caption’s containing block (that is, the table wrapper box).

    But when working with inline-start & inline-end values it should also consider the writing direction controlled by the CSS direction property on the HTML dir attribute.

  8. Loirooriol commented on Nov 29, 2023

    @Loirooriol
    Contributor

    https://drafts.csswg.org/css-writing-modes-4/#writing-mode

    A writing mode in CSS is determined by the writing-mode, direction, and text-orientation properties.

  9. fantasai commented on Dec 1, 2023

    @fantasai
    Collaborator

    Adding block-start and block-end aliases makes sense to me. The fact that top and bottom ended up interpreted flow-relative was an unfortunate consequence of left and right not being implemented (since they're substantially different, from a layout perspective, than top and bottom in horizontal-tb writing modes).

    I don't think they should be aliased to over/under; that wouldn't make a lot of sense.

  10. Loirooriol commented on Dec 1, 2023

    @Loirooriol
    Contributor

    Why wouldn't it make sense to define top/bottom as line-over/line-under if left/right are defined as line-left/line-right?

  11. fantasai commented on Dec 1, 2023

    @fantasai
    Collaborator

    The usage of top vs bottom is much closer to block-start/inline-start than over/under. Over/under is useful within a line box, but once you start getting to the block level, it's not a very useful concept for real content.

  12. css-meeting-bot commented on Jun 17, 2026

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css-logical] Add `block-start` and `block-end` to `caption-side` , and agreed to the following:

    • RESOLVED: add the block-start and block-end to the caption-side property and to behave as top and bottom respectively
    The full IRC log of that discussion <ydaniv> oriol: if caption side prop in CSS2 it had to and bottom keywords, some impls had left and right
    <ydaniv> ... top and bottom were refined to use logic
    <ydaniv> ... and line-left and line-right to use logic as well
    <ydaniv> ... Sebastian suggested [missed]
    <ydaniv> ... situation is inconsistent with flow-relative, so we could define top/bottom to line-above and line-under and provide different keywrods for flow relative
    <ydaniv> ... I'm fine with not doing what I proposed, we could add block-start and block-end as aliases, or keep as is, which will not behave as physical but in flow-relative
    <TabAtkins> (I'm a little confused about the use-case for caption-side's left/right being line-relative anyway.)
    <ydaniv> fantasai: I'm in favor to adding the aliases, which would be more consistent
    <TabAtkins> (Is this about inline-table?)
    <romain> +1 to adding the aliases
    <ydaniv> ... maybe in the future we could do something more interesting
    <TabAtkins> +1 to block-start/end tho
    <kurt> Should this apply to the other properties in https://drafts.csswg.org/css-logical (e.g. https://drafts.csswg.org/css-logical/#float-clear)?
    <ydaniv> fantasai: the left and right alignment and the start left/right text begins is the line-left side, so it would be line-relative, since top/bottom are line-relative
    <fantasai> s/line-relative/logical
    <ydaniv> ... perhaps if physical to begin with would work to make it physical
    <fantasai> s/physical to/we had all 4 directions to/
    <TabAtkins> (ohhhhhh right i forgot what exactly line-relative meant. writing-mode responsive, just left/right in some way in the inline axis)
    <ydaniv> fantasai: currently only top/bottom supported, we had to make them logical/physical
    <ydaniv> fantasai: float don't have these issues since these are line-relative
    <ydaniv> astearns: so not aliases, but equivelant keywords?
    <ydaniv> fantasai: yes
    <ydaniv> fantasai: maybe we'll find there's not enough content...
    <ydaniv> oriol: so they compute to how much...
    <ydaniv> fantasai: they're independent
    <ydaniv> PROPOSED: add the block-start and block-end to the caption-side property and to behave as top and bottom respectively
    <ydaniv> astearns: objections?
    <ydaniv> RESOLVED: add the block-start and block-end to the caption-side property and to behave as top and bottom respectively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions