Skip to content
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

Add attributes detail for svg <view> element #37034

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion files/en-us/web/svg/attribute/zoomandpan/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ slug: Web/SVG/Attribute/zoomAndPan
page-type: svg-attribute
status:
- deprecated
browser-compat: svg.elements.svg.zoomAndPan
browser-compat:
- svg.elements.svg.zoomAndPan
- svg.elements.view.zoomAndPan
---

{{SVGRef}}{{Deprecated_Header}}
Expand Down
12 changes: 7 additions & 5 deletions files/en-us/web/svg/element/view/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ The **`<view>`** [SVG](/en-US/docs/Web/SVG) element defines a particular view of

## Attributes

- {{SVGAttr("viewBox")}}
- {{SVGAttr("preserveAspectRatio")}}
- : This attribute defines how the SVG fragment must be deformed if it is embedded in a container with a different {{glossary("aspect ratio")}}.
_Value type_: (`none`| `xMinYMin`| `xMidYMin`| `xMaxYMin`| `xMinYMid`| `xMidYMid`| `xMaxYMid`| `xMinYMax`| `xMidYMax`| `xMaxYMax`) (`meet`|`slice`)? ; _Default value_: `xMidYMid meet`; _Animatable_: **yes**
- {{SVGAttr("viewBox")}}
- : This attribute defines the bound of the SVG viewport for the pattern fragment.
_Value type_: **[\<list-of-numbers>](/en-US/docs/Web/SVG/Content_type#list-of-ts)** ; _Default value_: none; _Animatable_: **yes**
- {{SVGAttr("zoomAndPan")}} {{Deprecated_Inline}} {{Non-standard_Inline}}
- : This attribute specifies whether the SVG document can be magnified and panned.
_Value type_: **disable | magnify** ; _Default value_: magnify; _Animatable_: **no**

## Example

Expand Down Expand Up @@ -50,10 +56,6 @@ The **`<view>`** [SVG](/en-US/docs/Web/SVG) element defines a particular view of

{{EmbedLiveSample("Example", "85ch", "240px")}}

## DOM Interface
Copy link
Collaborator

Choose a reason for hiding this comment

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

@skyclouds2001 This is removal of useful information.

Can you create a discussion for putting this back into the template, perhaps leaning on HTML for inspiration? What I'm thinking is something like https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#technical_summary

I'll accept this now as it is consistent.

Copy link
Contributor Author

@skyclouds2001 skyclouds2001 Dec 2, 2024

Choose a reason for hiding this comment

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

We could make the table generated by {{svginfo}} call also output DOM interface info, since SVGData.json already has the required data source

Copy link
Collaborator

Choose a reason for hiding this comment

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

@skyclouds2001 That would certainly be one option, which might have many benefits. Did you want to create a discussion around this or should I?


This element implements the {{domxref("SVGViewElement")}} interface.

## Specifications

{{Specifications}}
Expand Down