-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Conversation
Preview URLs (comment last updated: 2024-06-06 08:33:37) |
@chrisdavidmills I rewrote it, integrating your suggestions, and added a physical properties glossary entry |
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>
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
|
||
**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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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. |
There was a problem hiding this comment.
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 🐶
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. |
There was a problem hiding this 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.
@estelle the query is here: #33860 (comment) (just in case you have trouble finding it) |
Part of openwebdocs/project#205;
which is needed for openwebdocs/project#178