From 002f1c3b5d821c25cab0ff6bba000ed895c8bf14 Mon Sep 17 00:00:00 2001 From: Dave Letorey Date: Tue, 5 May 2026 15:42:12 +0100 Subject: [PATCH 1/3] added normal & match-parent values and updated intro --- .../reference/properties/position-anchor/index.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/css/reference/properties/position-anchor/index.md b/files/en-us/web/css/reference/properties/position-anchor/index.md index 7613192b8a69f9f..149a02f0867b6eb 100644 --- a/files/en-us/web/css/reference/properties/position-anchor/index.md +++ b/files/en-us/web/css/reference/properties/position-anchor/index.md @@ -7,15 +7,17 @@ browser-compat: css.properties.position-anchor sidebar: cssref --- -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. ## Syntax ```css /* Single values */ +position-anchor: normal; position-anchor: auto; position-anchor: none; position-anchor: --anchor-name; +position-anchor: match-parent; /* Global values */ position-anchor: inherit; @@ -27,15 +29,21 @@ position-anchor: unset; ### Values +- `normal` + - : If {{cssXRef("position-area")}} is `none`, behaves as `none`. Otherwise, behaves as `auto`. + - `auto` - : Associates a positioned element with its implicit anchor element, if it has one — for example as set by the non-standard HTML [`anchor`](/en-US/docs/Web/HTML/Reference/Global_attributes/anchor) attribute. - `none` - - : The initial (default) value. The positioned element is not associated with an anchor element. + - : The positioned element is not associated with an anchor element. - {{cssxref("dashed-ident")}} - : 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. + ## Description This property is only relevant to "positioned" elements — elements and pseudo-elements that have a {{cssxref("position")}} of `absolute` or `fixed` set. From bf42bcf317828c9e56467cd958cd1c3bdbabe690 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 8 May 2026 10:21:15 +1000 Subject: [PATCH 2/3] Apply suggestion from @hamishwillee --- .../en-us/web/css/reference/properties/position-anchor/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/reference/properties/position-anchor/index.md b/files/en-us/web/css/reference/properties/position-anchor/index.md index 149a02f0867b6eb..eb93686494c7698 100644 --- a/files/en-us/web/css/reference/properties/position-anchor/index.md +++ b/files/en-us/web/css/reference/properties/position-anchor/index.md @@ -42,7 +42,7 @@ position-anchor: unset; - : 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. + - : 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. ## Description From 93631999867fa93838e9384d98e015372f24daca Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Fri, 8 May 2026 10:25:11 +1000 Subject: [PATCH 3/3] Apply suggestion from @hamishwillee --- .../en-us/web/css/reference/properties/position-anchor/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/reference/properties/position-anchor/index.md b/files/en-us/web/css/reference/properties/position-anchor/index.md index eb93686494c7698..764affec7a49e27 100644 --- a/files/en-us/web/css/reference/properties/position-anchor/index.md +++ b/files/en-us/web/css/reference/properties/position-anchor/index.md @@ -30,7 +30,7 @@ position-anchor: unset; ### Values - `normal` - - : If {{cssXRef("position-area")}} is `none`, behaves as `none`. Otherwise, behaves as `auto`. + - : If {{cssxref("position-area")}} is `none`, behaves as `none`. Otherwise, behaves as `auto`. - `auto` - : Associates a positioned element with its implicit anchor element, if it has one — for example as set by the non-standard HTML [`anchor`](/en-US/docs/Web/HTML/Reference/Global_attributes/anchor) attribute.