From d10e7f6b1f6369b3d2b66aba0a651e13291fb525 Mon Sep 17 00:00:00 2001 From: skyclouds2001 <95597335+skyclouds2001@users.noreply.github.com> Date: Mon, 20 Jan 2025 00:03:03 +0800 Subject: [PATCH] Update value list for svg `` & `` elements --- .../web/svg/element/foreignobject/index.md | 4 ++ files/en-us/web/svg/element/image/index.md | 37 ++++++++++++++----- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/files/en-us/web/svg/element/foreignobject/index.md b/files/en-us/web/svg/element/foreignobject/index.md index 3246c56a7e61806..705bfe0637ddeb6 100644 --- a/files/en-us/web/svg/element/foreignobject/index.md +++ b/files/en-us/web/svg/element/foreignobject/index.md @@ -68,6 +68,10 @@ svg { > [!NOTE] > Starting with SVG2, `x`, `y`, `width`, and `height` are _Geometry Properties_, meaning those attributes can also be used as CSS properties for that element. +## DOM Interface + +This element implements the {{domxref("SVGForeignObjectElement")}} interface. + ## Usage context {{svginfo}} diff --git a/files/en-us/web/svg/element/image/index.md b/files/en-us/web/svg/element/image/index.md index ed81d7415634c76..f32ca57ff150f63 100644 --- a/files/en-us/web/svg/element/image/index.md +++ b/files/en-us/web/svg/element/image/index.md @@ -22,18 +22,37 @@ SVG files displayed with `` are [treated as an image](/en-US/docs/Web/SVG ## Attributes -- {{SVGAttr("x")}}: Positions the image horizontally from the origin. -- {{SVGAttr("y")}}: Positions the image vertically from the origin. -- {{SVGAttr("width")}}: The width the image renders at. Unlike HTML's ``, this attribute is required. -- {{SVGAttr("height")}}: The height the image renders at. Unlike HTML's ``, this attribute is required. -- {{SVGAttr("href")}} and {{SVGAttr("xlink:href")}}{{deprecated_inline}}: Points at a URL for the image file. -- {{SVGAttr("preserveAspectRatio")}}: Controls how the image is scaled. -- {{SVGAttr("crossorigin")}}: Defines the value of the credentials flag for CORS requests. -- {{SVGAttr("decoding")}}: Provides a hint to the browser as to whether it should perform image decoding synchronously or asynchronously. +- {{SVGAttr("x")}} + - : Positions the image horizontally from the origin. + _Value type_: [**\**](/en-US/docs/Web/SVG/Content_type#length)|[**\**](/en-US/docs/Web/SVG/Content_type#percentage) ; _Default value_: `0`; _Animatable_: **yes** +- {{SVGAttr("y")}} + - : Positions the image vertically from the origin. + _Value type_: [**\**](/en-US/docs/Web/SVG/Content_type#length)|[**\**](/en-US/docs/Web/SVG/Content_type#percentage) ; _Default value_: `0`; _Animatable_: **yes** +- {{SVGAttr("width")}} + - : The width the image renders at. Unlike HTML's ``, this attribute is required. + _Value type_: [**\**](/en-US/docs/Web/SVG/Content_type#length)|[**\**](/en-US/docs/Web/SVG/Content_type#percentage) ; _Default value_: `auto`; _Animatable_: **yes** +- {{SVGAttr("height")}} + - : The height the image renders at. Unlike HTML's ``, this attribute is required. + _Value type_: [**\**](/en-US/docs/Web/SVG/Content_type#length)|[**\**](/en-US/docs/Web/SVG/Content_type#percentage) ; _Default value_: `auto`; _Animatable_: **yes** +- {{SVGAttr("href")}} + - : Points at a URL for the image file. + _Value type_: **[\](/en-US/docs/Web/SVG/Content_type#url)** ; _Default value_: _none_; _Animatable_: **no** +- {{SVGAttr("preserveAspectRatio")}} + - : Controls how the image is scaled. + _Value type_: (`none`| `xMinYMin`| `xMidYMin`| `xMaxYMin`| `xMinYMid`| `xMidYMid`| `xMaxYMid`| `xMinYMax`| `xMidYMax`| `xMaxYMax`) (`meet`|`slice`)? ; _Default value_: `xMidYMid meet`; _Animatable_: **yes** +- {{SVGAttr("crossorigin")}} + - : Defines the value of the credentials flag for CORS requests. + _Value type_: [ anonymous | use-credentials ]? ; _Default value_: None; _Animatable_: **yes** +- {{SVGAttr("decoding")}} + - : Provides a hint to the browser as to whether it should perform image decoding synchronously or asynchronously. + _Value type_: `async | sync | auto` ; _Default value_: `auto`; _Animatable_: **yes** +- {{SVGAttr("xlink:href")}}{{deprecated_inline}} + - : Points at a URL for the image file. + _Value type_: **[\](/en-US/docs/Web/SVG/Content_type#url)** ; _Default value_: _none_; _Animatable_: **no** ## DOM Interface -`` implements the {{domxref("SVGImageElement")}} interface. +This element implements the {{domxref("SVGImageElement")}} interface. ## Example