Skip to content

Conversation

@SebastianZ
Copy link
Contributor

An issue in CSS Borders 4 asked whether we should move the logical border properties from CSS Logical 1 to that spec.

As we generally define logical properties and values in their dedicated specs, these days, I thought it would make sense to do that for them as well. So I went ahead and copied those definitions over and renamed "flow-relative" by "logical" as that's the term that's commonly used in newer specs.

I kept the definitions in CSS Logical 1 untouched for now, though, as CSS Borders 4 is meant to supersede those definitions. (Is there anything I have to do to indicate this?)

Sebastian

Copy link
Collaborator

@fantasai fantasai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to merging these in, but, I think we should try to integrate them into the spec a bit better, so that they don't feel so tacked on. One of our goals (mine anyway) is to make the logical properties eventually feel like 1st-class citizens alongside the physical ones. Probably should do the same in css-box-4 as well, fwiw.

The existing properties should indeed stay in css-logical-1 ; that spec scopes itself to defining the logical equivalents of all CSS2 properties, and expecting future topical specs to supersede and expand on their relevant logical properties.

@SebastianZ SebastianZ force-pushed the logical-borders-to-css-borders-4 branch from 523dab3 to 8463087 Compare November 18, 2023 22:51
@SebastianZ
Copy link
Contributor Author

+1 to merging these in, but, I think we should try to integrate them into the spec a bit better, so that they don't feel so tacked on. One of our goals (mine anyway) is to make the logical properties eventually feel like 1st-class citizens alongside the physical ones. Probably should do the same in css-box-4 as well, fwiw.

I tried to improve that by merging the definitions of both the physical and logical ones. Hope that's better now.

Note that I did not merge everything from CSS Backgrounds 3 in yet. I plan to do that once the spec. is stable enough.

Sebastian

@SebastianZ SebastianZ requested a review from fantasai November 19, 2023 00:22
Comment on lines 230 to 231
<h3 id="logical-shorthand-keyword">
Four-Directional Shorthand Properties: the 'logical' keyword for 'border-width', 'border-style', and 'border-color'</h3>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this section, as this issue is being worked out in css-logical. Once that stabilizes, we can add relevant bits of spec text; but probably there will be a central definition that we can link to for these types of shorthands, not one that needs to be copied from spec to spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed.

@SebastianZ SebastianZ requested a review from fantasai November 20, 2023 20:28
Comment on lines 99 to 104
The logical properties 'border-block-start-color', 'border-block-end-color',
'border-inline-start-color', and 'border-inline-end-color' correspond to the
'border-top-color', 'border-bottom-color', 'border-left-color',
and 'border-right-color' properties.
The mapping depends on the element's 'writing-mode', 'direction',
and 'text-orientation'.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrap.

Suggested change
The logical properties 'border-block-start-color', 'border-block-end-color',
'border-inline-start-color', and 'border-inline-end-color' correspond to the
'border-top-color', 'border-bottom-color', 'border-left-color',
and 'border-right-color' properties.
The mapping depends on the element's 'writing-mode', 'direction',
and 'text-orientation'.
The [=flow-relative=] properties
'border-block-start-color',
'border-block-end-color',
'border-inline-start-color',
and 'border-inline-end-color'
correspond to the [=physical=] properties
'border-top-color',
'border-bottom-color',
'border-left-color',
and 'border-right-color' properties.
The mapping depends on the element's 'writing-mode', 'direction', and 'text-orientation'.

Likewise below. Once we start wrapping a list, we usually put each item on a separate line; that makes it straightforward to add/move items.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +39 to +42
<p>The border can either be a predefined style (solid line, double
line, dotted line, pseudo-3D border, etc.) or it can be an image. In
the former case, various properties define the style ('border-style'),
color ('border-color'), and thickness ('border-width') of the border.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This needs rewrapping, but so does the entire css-backgrounds-3 spec, so keeping it corresponding seems fine for now, and we will keep them in sync later after I re-wrap css-backgrounds-3. :) See css-cascade-* for what this looks like, and bin/xcommit.pl for why this is important.)

Comment on lines 116 to 119
The first value represents the <a>start</a> edge color,
and the second value represents the <a>end</a> edge color.
If only one value is given,
it applies to both the <a>start</a> and <a>end</a> edges.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use "side", not "edge", to refer to the parts of the border. See e.g. https://www.w3.org/TR/css-backgrounds-3/#border-color

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, done. Though Backgrounds 3 (and also Borders 4) still uses "edge" in other places.

@SebastianZ SebastianZ requested a review from fantasai November 23, 2023 23:49
Copy link
Collaborator

@fantasai fantasai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the line in "changes" and otherwise it looks good!

…tive border properties being renamed to "logical"
@SebastianZ SebastianZ merged commit 9058345 into w3c:main Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants