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

Editorial review: CSS anchor positioning 4: sizing and positioning part 2 #33511

Merged
merged 30 commits into from
Jul 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fc39b9a
Add anchor-size() function ref page
chrisdavidmills May 9, 2024
7fddda7
Add anchor-size() details to relevant property pages
chrisdavidmills May 9, 2024
143df3f
Add inset-area ref page
chrisdavidmills May 11, 2024
df5262c
Merge branch 'main' into css-anchor-positioning-4
chrisdavidmills May 11, 2024
19e47ab
Merge branch 'main' into css-anchor-positioning-4
chrisdavidmills May 15, 2024
a8a67ff
Fixes for mfreed7 review comments
chrisdavidmills May 15, 2024
989e788
Merge branch 'main' into css-anchor-positioning-4
chrisdavidmills May 15, 2024
4e4af03
Update files/en-us/web/css/inset-area/index.md
chrisdavidmills May 15, 2024
2e5bf9a
Merge branch 'main' into css-anchor-positioning-4
chrisdavidmills May 21, 2024
e13e118
Change anchor names to make them more distinct and less confusing
chrisdavidmills May 31, 2024
b1ff88c
Fix wording and casing for reference links
chrisdavidmills May 31, 2024
dc680e0
Anchor name consistency
chrisdavidmills May 31, 2024
48ff49a
update anchor-size() fallback description
chrisdavidmills May 31, 2024
800cd21
estelle comments answered, inset-area type page added
chrisdavidmills Jun 5, 2024
f914db6
Update files/en-us/web/css/anchor-size/index.md
chrisdavidmills Jun 5, 2024
4690bcb
Merge branch 'main' into css-anchor-positioning-4
chrisdavidmills Jun 5, 2024
7c4025d
fix relative link error
chrisdavidmills Jun 5, 2024
9381333
Update syntax section for consistency
chrisdavidmills Jun 14, 2024
94385c0
Simply CSS explanation
chrisdavidmills Jun 14, 2024
78ac1c0
improve see also links
chrisdavidmills Jun 14, 2024
40ed111
Merge branch 'main' into css-anchor-positioning-4
estelle Jun 25, 2024
2e7ceff
remove bolding from words not subsequently defined
estelle Jun 26, 2024
e9b4290
removed from property values; integrated into length syntax.
estelle Jun 26, 2024
cfb7bf1
integrated into length syntax.
estelle Jun 26, 2024
1c7557e
anchor-size guide
estelle Jun 27, 2024
ed12f90
anchor-size guide - reread edits
estelle Jun 27, 2024
693e118
Merge pull request #10 from mdn/ap4-1
chrisdavidmills Jun 27, 2024
67e9862
few final tweaks to anchor-size()
chrisdavidmills Jun 27, 2024
3196892
Merge branch 'main' into css-anchor-positioning-4
chrisdavidmills Jul 2, 2024
7de2557
remove inset-area property and value pages
chrisdavidmills Jul 2, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes for mfreed7 review comments
  • Loading branch information
chrisdavidmills committed May 15, 2024
commit a8a67ff6fbde4fb453f0bece180ea05a78d2edf3
15 changes: 8 additions & 7 deletions files/en-us/web/css/inset-area/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For detailed information on anchor usage, see the [CSS Anchor Positioning](/en-U
## Syntax

```css
/* Two values to place the element in a single specific tile */
/* Examples: Two keywords to place the element in a single specific tile */
/* Physical */
inset-area: top left;
inset-area: bottom right;
Expand All @@ -29,7 +29,7 @@ inset-area: inline-start block-end;
inset-area: x-start y-end;
inset-area: center y-self-end;

/* Two values to span the element across two tiles */
/* Examples: Two keywords to span the element across two tiles */
/* Physical */
inset-area: top span-left;
inset-area: span-bottom right;
Expand All @@ -39,12 +39,12 @@ inset-area: inline-start span-block-end;
/* Coordinate-based */
inset-area: y-start span-x-end;

/* Two values to span the element across three tiles */
/* Examples: Two keywords to span the element across three tiles */
Copy link
Member

Choose a reason for hiding this comment

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

how about something like:

/* Two keywords to span the element across three tiles, and their one keyword equivalents */
inset-area: top span-all;
inset-area: top;
inset-area: block-end span-all;
inset-area: block-end;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather not make this change, as it might lead readers to think that the implied second keyword is always span-all, when this is not the case. The next syntax section gives some correct single keyword examples, and the implied keyword situations are discussed in depth later on.

inset-area: top span-all;
inset-area: block-end span-all;
inset-area: x-self-start span-all;

/* One value with an implicit second value */
/* Examples: One keyword with an implicit second keyword */
inset-area: top; /* equiv: top span-all */
inset-area: inline-start; /* equiv: inline-start span-all */
inset-area: center; /* equiv: center center */
Expand All @@ -62,7 +62,9 @@ inset-area: unset;

### Values
Copy link
Member

Choose a reason for hiding this comment

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

This area should be fairly short:

two value only (<inset-area> and none), no intro sentence.
the inset area term should link to a new inset-area data type page that explains all the value, including the image.

Add all the rest under "description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I disagreed with you about this initially, but on looking at it, I ended up agreeing. There is so much information on this page that it benefitted from being split, and the values are so much easier to explore in the separate page.

So, pages separated, let me know what you think.


The following sections explain in detail the different types of keywords that can be used in `inset-area` values. Generally, you can't mix different types in one value, e.g. physical and logical. To do so results in invalid values.
The following sections explain in detail the different types of keywords that can be used in `inset-area` values.

> **Note:** Generally, you can't mix different types in one value, e.g. physical and logical. To do so results in invalid values. For example, `inset-area: bottom inline-end` is not a valid value because it mixes physical and logical keywords.

#### Physical grid keywords

Expand Down Expand Up @@ -123,7 +125,6 @@ These keywords specify the position of the element on the `inset-area` grid usin
- `span-start`: Cause the element to span the center tile and the start tile of the grid row/column.
- `span-end`: Cause the element to span the center tile and the end tile of the grid row/column.
- Keywords with position/direction calculated from the element's own writing mode:

- `span-self-start`: Cause the element to span the center tile and the start tile of the grid row/column.
chrisdavidmills marked this conversation as resolved.
Show resolved Hide resolved
- `span-self-end`: Cause the element to span the center tile and the end tile of the grid row/column.

Expand Down Expand Up @@ -155,7 +156,7 @@ These keywords specify the position of the element on the `inset-area` grid usin

For example, `block-end span-inline-start` will cause the element to be placed in the center of the end block row, and then spanned across the tiles in that row that are also in the inline center and start columns. With `writing-mode: horizontal-tb` set, this would span the element over the bottom center and bottom left of the anchor, whereas with `writing-mode: vertical-rl` set it would span the element over the right center and top right.

> **Note:** The specification does not currently define `self` equivalents of these keywords, for example — `span-block-self-start`, `span-block-self-end`, `span-inline-self-start`, and `span-inline-self-end` — and they are not supported in any browser.
> **Note:** The specification defines `self` equivalents of these keywords, for example — `span-self-block-start`, `span-self-block-end`, `span-self-inline-start`, and `span-self-inline-end`. However, these are not currently supported in any browser.

> **Note:** Trying to pair a row or column keyword with an inappropriate spanning keyword will result in an invalid property value. For example, `block-end span-block-end` is invalid — you can't place the element in the block-end row and then try to span one tile further past the block end.

Expand Down
Loading