Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New glossary: logical and physical properties #33860

Merged
merged 16 commits into from
Jun 6, 2024
Merged

New glossary: logical and physical properties #33860

merged 16 commits into from
Jun 6, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented May 31, 2024

Part of openwebdocs/project#205;
which is needed for openwebdocs/project#178

@estelle estelle requested a review from a team as a code owner May 31, 2024 20:58
@estelle estelle requested review from pepelsbey and removed request for a team May 31, 2024 20:58
@github-actions github-actions bot added the Content:Glossary Glossary entries label May 31, 2024
@github-actions github-actions bot added the size/s [PR only] 6-50 LoC changed label May 31, 2024
Copy link
Contributor

github-actions bot commented May 31, 2024

Preview URLs

(comment last updated: 2024-06-06 08:33:37)

chrisdavidmills

This comment was marked as resolved.

@estelle
Copy link
Member Author

estelle commented Jun 3, 2024

@chrisdavidmills I rewrote it, integrating your suggestions, and added a physical properties glossary entry

@estelle estelle requested review from chrisdavidmills and removed request for pepelsbey June 3, 2024 18:30
@estelle estelle changed the title New glossary: logical properties New glossary: logical and physical properties Jun 3, 2024
estelle and others added 3 commits June 3, 2024 12:52
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Few more comments for you to consider. Nice work @estelle.


CSS **logical properties** provide a way to lay out content based on the document's writing mode and direction rather than the physical dimensions of the viewport. This enables more flexible and maintainable designs, especially for websites supporting multiple languages.

Whereas {{glossary("physical properties")}} define positions based on physical directions; with {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("bottom")}}, and {{cssxref("left")}} referring to the physical dimensions of the viewport and properties like {{cssxref("margin-top")}}, {{cssxref("border-right")}}, {{cssxref("padding-bottom")}}, and {{cssxref("border-bottom-left-radius")}}reference specific sides of an element, logical properties are relative to the content flow and use directional keywords that are relative to the block and inline axes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Whereas {{glossary("physical properties")}} define positions based on physical directions; with {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("bottom")}}, and {{cssxref("left")}} referring to the physical dimensions of the viewport and properties like {{cssxref("margin-top")}}, {{cssxref("border-right")}}, {{cssxref("padding-bottom")}}, and {{cssxref("border-bottom-left-radius")}}reference specific sides of an element, logical properties are relative to the content flow and use directional keywords that are relative to the block and inline axes.
Whereas {{glossary("physical properties")}} define positions based on physical directions, logical properties such as {{cssxref("margin-block-start")}} and {{cssxref("padding-inline-end")}} use logical directional keywords relative to the content flow along the block and inline axes.

I don't think all of the physical examples are needed. You link to the physical properties page, where you provide examples of such properties. The original was rather long and cumbersome to read.

I have also included the information provided by the sentence above the "See also" section, which I am suggesting you delete.

Copy link
Member Author

Choose a reason for hiding this comment

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

Went with:

Whereas {{glossary("physical properties")}}, like {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("padding-bottom")}}, and {{cssxref("border-bottom-left-radius")}}, define positions and features based on physical directions and reference specific sides of an element, logical properties such as {{cssxref("block-start")}}, {{cssxref("inline-end")}}, {{cssxref("padding-block-end")}}, and {{cssxref("border-end-end-radius")}} use logical directional keywords that are relative to the content flow along the block and inline axes.

using 4 physical properties and their mapped logical property equivalents. I think that improves it a lot.

Copy link
Contributor

Choose a reason for hiding this comment

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

Much better — my only issue is that I don't think block-start and inline-end are properties. Did you mean margin-block-start and margin-inline-end, or similar?

Copy link
Contributor

Choose a reason for hiding this comment

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

The links are broken, you see. Of course, we might just not have documented them yet...

files/en-us/glossary/logical_properties/index.md Outdated Show resolved Hide resolved
files/en-us/glossary/logical_properties/index.md Outdated Show resolved Hide resolved
files/en-us/glossary/logical_properties/index.md Outdated Show resolved Hide resolved

**Inline-start** and **inline-end** represent the _start edge_ and _end edge_ of content along the inline axis, respectively, with the values and properties `inline-start` and `inline-end` being the equivalent of `left` and `right` properties and values in horizontal writing modes, but whether each means `right` or `left` depends on the writing direction (`inline-start` is `left` in left-to-right languages and `right` in right-to-left languages.)

Therefore, logical properties, like {{cssxref("margin-block-start")}} and {{cssxref("padding-inline-end")}}, use logical keywords relative to the content flow.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest removing this and moving these details as per my suggestion above. This sentence feels a bit out of place and without context, in the current position.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

files/en-us/glossary/physical_properties/index.md Outdated Show resolved Hide resolved
files/en-us/glossary/physical_properties/index.md Outdated Show resolved Hide resolved
estelle and others added 5 commits June 5, 2024 12:05
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>

CSS **logical properties** provide a way to lay out content based on the document's writing mode and direction rather than the physical dimensions of the viewport. This enables more flexible and maintainable designs, especially for websites supporting multiple languages.

Whereas {{glossary("physical properties")}}, like {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("padding-bottom")}}, and {{cssxref("border-bottom-left-radius")}}, efine positions based on physical directions and reference specific sides of an element, logical properties logical properties such as {{cssxref("margin-block-start")}} and {{cssxref("padding-inline-end")}} use logical directional keywords that are relative to the content flow along the block and inline axes.
Copy link
Contributor

Choose a reason for hiding this comment

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

[mdn-linter] reported by reviewdog 🐶

Suggested change
Whereas {{glossary("physical properties")}}, like {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("padding-bottom")}}, and {{cssxref("border-bottom-left-radius")}}, efine positions based on physical directions and reference specific sides of an element, logical properties logical properties such as {{cssxref("margin-block-start")}} and {{cssxref("padding-inline-end")}} use logical directional keywords that are relative to the content flow along the block and inline axes.
Whereas {{glossary("physical properties")}}, like {{cssxref("top")}}, {{cssxref("right")}}, {{cssxref("padding-bottom")}}, and {{cssxref("border-bottom-left-radius")}}, efine positions based on physical directions and reference specific sides of an element, logical properties logical properties such as {{cssxref("margin-block-start")}} and {{cssxref("padding-inline-end")}} use logical directional keywords that are relative to the content flow along the block and inline axes.

Copy link
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

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

Nice work @estelle; LGTM, pending one little query about property names. Should be a quick fix, so I'll approve.

@chrisdavidmills
Copy link
Contributor

@estelle the query is here: #33860 (comment)

(just in case you have trouble finding it)

@estelle estelle merged commit aa0ae01 into main Jun 6, 2024
9 checks passed
@estelle estelle deleted the gLogical branch June 6, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Glossary Glossary entries size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants