Skip to content

added normal & match-parent values and updated intro#44017

Open
dletorey wants to merge 4 commits intomdn:mainfrom
dletorey:43867-position-anchor-normal
Open

added normal & match-parent values and updated intro#44017
dletorey wants to merge 4 commits intomdn:mainfrom
dletorey:43867-position-anchor-normal

Conversation

@dletorey
Copy link
Copy Markdown
Contributor

@dletorey dletorey commented May 5, 2026

Description

  • Updated the introduction for position-anchor property
  • Updated syntax for position-anchor property
  • Updated values for position-anchor property

Motivation

Related issues and pull requests

@dletorey dletorey requested a review from a team as a code owner May 5, 2026 15:43
@dletorey dletorey requested review from hamishwillee and removed request for a team May 5, 2026 15:43
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Preview URLs (1 page)

(comment last updated: 2026-05-08 00:27:02)

Comment thread files/en-us/web/css/reference/properties/position-anchor/index.md Outdated
Comment thread files/en-us/web/css/reference/properties/position-anchor/index.md Outdated
- : The name of the anchor element to associate the positioned element with, as listed in the anchor element's {{cssxref("anchor-name")}} property. This is known as the **default anchor specifier**.

- `match-parent`
- : Uses the same default anchor element as the parent or originating element, if this is a [pseudo-element](/en-US/docs/Glossary/Pseudo-element) ​if any, and if that would be an acceptable anchor element. Otherwise it has no default anchor element.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't understand this. Does it mean:

Suggested change
- : Uses the same default anchor element as the parent or originating element, if this is a [pseudo-element](/en-US/docs/Glossary/Pseudo-element) ​if any, and if that would be an acceptable anchor element. Otherwise it has no default anchor element.
- : Uses the same default anchor element as the parent element, or the originating element if this is a [pseudo-element](/en-US/docs/Glossary/Pseudo-element), provided that would be an acceptable anchor element. Otherwise, it has no default anchor element.

Note, I don't know what would make a pseudo element acceptable

### Values

- `normal`
- : If {{cssxref("position-area")}} is `none`, behaves as `none`. Otherwise, behaves as `auto`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- : If {{cssxref("position-area")}} is `none`, behaves as `none`. Otherwise, behaves as `auto`.
- : If {{cssxref("position-area")}} is `none`, it behaves as `none`. Otherwise it behaves as `auto`.

---

The **`position-anchor`** [CSS](/en-US/docs/Web/CSS) property specifies the anchor name of the **anchor element** (i.e., an element that has an **anchor name** set on it via the {{cssxref("anchor-name")}} property) a positioned element is associated with.
The **`position-anchor`** [CSS](/en-US/docs/Web/CSS) property specifies the default **anchor element** (i.e., an element that has an **anchor name** set on it via the {{cssxref("anchor-name")}} property), which is used by {{cssxref("position-area")}}, {{cssxref("position-try")}}, and (by default) all anchor functions ({{cssxref("anchor()")}} and {{cssxref("anchor-size()")}}) applied to this element.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The problem predates your chagens, but I don't understand this as written. I think it means this - can you confirm? Note that I used <anchor-name> rather than the property, because those methods specify it this way. When you link though, the value is an anchor-name property value.

Suggested change
The **`position-anchor`** [CSS](/en-US/docs/Web/CSS) property specifies the default **anchor element** (i.e., an element that has an **anchor name** set on it via the {{cssxref("anchor-name")}} property), which is used by {{cssxref("position-area")}}, {{cssxref("position-try")}}, and (by default) all anchor functions ({{cssxref("anchor()")}} and {{cssxref("anchor-size()")}}) applied to this element.
The **`position-anchor`** [CSS](/en-US/docs/Web/CSS) property specifies the default **anchor element** for a positioned element.
This default is used by {{cssxref("position-area")}} and {{cssxref("position-try")}}, and by anchor functions ({{cssxref("anchor()")}} and {{cssxref("anchor-size()")}}) when no `<anchor-name>` argument is provided to those functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants