From efab12f729b549406b2e0789a87590572f5af6af Mon Sep 17 00:00:00 2001 From: Nick Yonge Date: Thu, 9 Apr 2026 03:00:45 -0700 Subject: [PATCH 01/10] linking to and CSS Units & Values from CSSUnitValue (#43699) * Update index.md added See Also and link to * Update index.md Added link to and some reference links to all types of units * corrected data types refs can be any numeric data type, not just . also better examples * Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestion from @github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/api/cssunitvalue/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/api/cssunitvalue/unit/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Casing changes * Update index.md * Update files/en-us/web/api/cssunitvalue/index.md thanks chris! Co-authored-by: Chris Mills --------- Co-authored-by: Chris Mills Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/api/cssunitvalue/index.md | 13 ++++++++++--- files/en-us/web/api/cssunitvalue/unit/index.md | 7 ++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/files/en-us/web/api/cssunitvalue/index.md b/files/en-us/web/api/cssunitvalue/index.md index 667f1455ca3d48d..98c7a691ffe4471 100644 --- a/files/en-us/web/api/cssunitvalue/index.md +++ b/files/en-us/web/api/cssunitvalue/index.md @@ -7,7 +7,9 @@ browser-compat: api.CSSUnitValue {{APIRef("CSS Typed Object Model API")}} -The **`CSSUnitValue`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model#css_typed_object_model) represents values that contain a single unit type. For example, "42px" would be represented by a `CSSNumericValue`. +The **`CSSUnitValue`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model#css_typed_object_model) represents values that contain a single [unit type](/en-US/docs/Web/CSS/Guides/Values_and_units#units). + +For example, the value `42px` (a {{cssxref("<dimension>")}}) would be represented by a `CSSNumericValue`. {{InheritanceDiagram}} @@ -19,9 +21,9 @@ The **`CSSUnitValue`** interface of the [CSS Typed Object Model API](/en-US/docs ## Instance properties - {{domxref('CSSUnitValue.value')}} - - : Returns a double indicating the number of units. + - : Returns a double indicating the number of units. For a `CSSNumericValue` representing `42px`, this would be `42`. - {{domxref('CSSUnitValue.unit')}} - - : Returns a string indicating the type of unit. + - : Returns a string indicating the type of unit. For a `CSSNumericValue` representing `42px`, this would be `"px"`. ## Static methods @@ -49,3 +51,8 @@ let pos = new CSSPositionValue( ## Browser compatibility {{Compat}} + +## See also + +- [CSS numeric data types](/en-US/docs/Web/CSS/Guides/Values_and_units/Numeric_data_types) +- [CSS values and units](/en-US/docs/Web/CSS/Guides/Values_and_units), a listing of all possible units and data types diff --git a/files/en-us/web/api/cssunitvalue/unit/index.md b/files/en-us/web/api/cssunitvalue/unit/index.md index b2a903a6d983856..8ce7531bb9dd9c4 100644 --- a/files/en-us/web/api/cssunitvalue/unit/index.md +++ b/files/en-us/web/api/cssunitvalue/unit/index.md @@ -10,11 +10,11 @@ browser-compat: api.CSSUnitValue.unit The **`CSSUnitValue.unit`** read-only property of the {{domxref("CSSUnitValue")}} interface returns a string -indicating the type of unit. +indicating the [unit type](/en-US/docs/Web/CSS/Guides/Values_and_units#units). ## Value -A string. +A string indicating the unit type, such as `"em"`, `"px"`, `"%"`, etc. ## Examples @@ -43,6 +43,7 @@ console.log(pos.y.unit); // "em" ## See also - {{domxref('CSSUnitValue.value')}} -- [Dimensions in CSS values and units](/en-US/docs/Web/CSS/Guides/Values_and_units/Numeric_data_types#dimensions) +- [CSS numeric data types](/en-US/docs/Web/CSS/Guides/Values_and_units/Numeric_data_types) +- [CSS values and units](/en-US/docs/Web/CSS/Guides/Values_and_units), a listing of all possible unit types - [Using the CSS Typed OM](/en-US/docs/Web/API/CSS_Typed_OM_API/Guide) - [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Typed_OM_API) From dea6ca35b4cba685b7353a92b77f55e3fd6937c1 Mon Sep 17 00:00:00 2001 From: Estelle Weyl Date: Thu, 9 Apr 2026 14:59:56 +0200 Subject: [PATCH 02/10] HTML select element: code explanations and tech summary (#43714) * HTML select element: code explanations and tech summary Add code explanation in example sections. Updated text for clarity and corrected minor errors in the examples section. ARIA role match spec: https://w3c.github.io/html-aria/#el-select * Update files/en-us/web/html/reference/elements/select/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Chris Mills * Update files/en-us/web/html/reference/elements/select/index.md Co-authored-by: Chris Mills --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Mills --- .../html/reference/elements/select/index.md | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/files/en-us/web/html/reference/elements/select/index.md b/files/en-us/web/html/reference/elements/select/index.md index 0649243719fa38a..608f4768e794274 100644 --- a/files/en-us/web/html/reference/elements/select/index.md +++ b/files/en-us/web/html/reference/elements/select/index.md @@ -131,10 +131,9 @@ The `
` within a ` @@ -190,7 +189,12 @@ The following example creates a dropdown menu with grouping using {{HTMLElement( ### Advanced select with multiple features -The follow example is more complex, showing off more features you can use on a `` element: + +- The `multiple` attribute enables selecting more than one option. +- The `size` attribute is set to `4`, which means 4 lines are displayed at a time. Users can scroll to view all the options. +- Two {{htmlelement("optgroup")}} elements are included, creating two visual groupings, generally with the group name being bolded and nested options being indented. +- The `disabled` attribute is included on the "Hamster" option, making that option not selectable. ```html