-
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
Editorial review: CSS anchor positioning 4: sizing and positioning part 2 #33511
Changes from 1 commit
fc39b9a
7fddda7
143df3f
df5262c
19e47ab
a8a67ff
989e788
4e4af03
2e5bf9a
e13e118
b1ff88c
dc680e0
48ff49a
800cd21
f914db6
4690bcb
7c4025d
9381333
94385c0
78ac1c0
40ed111
2e7ceff
e9b4290
cfb7bf1
1c7557e
ed12f90
693e118
67e9862
3196892
7de2557
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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; | ||
|
@@ -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 */ | ||
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 */ | ||
|
@@ -62,7 +62,9 @@ inset-area: unset; | |
|
||
### Values | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This area should be fairly short: two value only ( Add all the rest under "description. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
||
|
@@ -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. | ||
|
||
|
@@ -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. | ||
|
||
|
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.
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;
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 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.