Skip to content

Commit

Permalink
[linking] Deprecating viewTarget attribute on the <view> element
Browse files Browse the repository at this point in the history
RESOLUTION: We will remove the <view viewTarget> attribute, its DOM
property, and the corresponding view spec argument.

A bit of context here - on the meeting we've discussed that the
attribute was create in hope to allow some sort of automatic
positioning, sizing and clipping of the views based on viewTarget
elements. However we've confirmed that no browser engine (Blink, Gecko,
Edge) implements it this way and viewTarget has no functional effect on
the presentation of SVG content. We've also confirmed there are no open
issues on Blink, Gecko, Edge and no indication of author interest
(Stackoverflow, GitHub). Even with good intentions the attribute wasn't
spec'd enough in SVG 1.1 or SVG 2 and we've agreed to remove the
attribute (+ DOM, svgView specification).
  • Loading branch information
boggydigital committed Aug 26, 2015
1 parent d45b8a3 commit c1690ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 61 deletions.
1 change: 0 additions & 1 deletion master/definitions.xml
Expand Up @@ -527,7 +527,6 @@
attributecategories='aria, core, global event'
attributes='viewBox, preserveAspectRatio, zoomAndPan'
interfaces='SVGViewElement'>
<attribute name='viewTarget' elements='view' href='linking.html#ViewElementViewTargetAttribute'/>
</element>

<!-- ... element categories ............................................ -->
Expand Down
62 changes: 2 additions & 60 deletions master/linking.html
Expand Up @@ -564,13 +564,11 @@ <h3 id="SVGFragmentIdentifiersDefinitions">SVG fragment identifiers definitions<
SVGViewAttribute ::= viewBoxSpec |
preserveAspectRatioSpec |
transformSpec |
zoomAndPanSpec |
viewTargetSpec
zoomAndPanSpec
viewBoxSpec ::= 'viewBox(' ViewBoxParams ')'
preserveAspectRatioSpec = 'preserveAspectRatio(' AspectParams ')'
transformSpec ::= 'transform(' TransformParams ')'
zoomAndPanSpec ::= 'zoomAndPan(' ZoomAndPanParams ')'
viewTargetSpec ::= 'viewTarget(' ViewTargetParams ')'
</pre>

<p>where:</p>
Expand All @@ -596,9 +594,6 @@ <h3 id="SVGFragmentIdentifiersDefinitions">SVG fragment identifiers definitions<
parameter values for the <a>'zoomAndPan'</a> attribute on the <a>'view'</a>
element. For example, <span class="attr-value">zoomAndPan(magnify)</span>.</li>

<li><span class="code-fragment">ViewTargetParams</span> corresponds to the
parameter values for the <a>'view/viewTarget'</a> attribute on the <a>'view'</a>
element. For example, <span class="attr-value">viewTarget(MyElementID)</span>.</li>
</ul>

<p>SVG view box parameters are applied in order, as defined in
Expand Down Expand Up @@ -691,56 +686,8 @@ <h3 id="ViewElement">Predefined views: the <span class="element-name">'view'</sp
<p>The <span class="element-name">'view'</span> element is defined as follows:</p>

<edit:elementsummary name='view'/>

<p><em>Attribute definitions:</em></p>

<dl class="attrdef-list">
<dt>
<table class="propdef attrdef">
<tr>
<th>Name</th>
<th>Value</th>
<th>Initial value</th>
<th>Animatable</th>
</tr>
<tr>
<td><dfn id="ViewElementViewTargetAttribute">viewTarget</dfn></td>
<td>(see below)</td>
<td>(none)</td>
<td>no</td>
</tr>
</table>
</dt>
<dd>
Indicates the target object associated with the view. This attribute
must be any value other than the empty string.
<div class="issue" data-issue="12">
Define the expected effect of declaring a 'viewTarget', here or in
an svgView target fragment.
</div>
</dd>
</dl>

</edit:with>

<h3 id="ViewHighlight">Highlighting views</h3>

<div class="issue" data-issue="13">
This section and example needs to be updated subject to a decision on
whether 'viewTarget' should cause a match to the ':target' pseudoclass.
</div>

<p>It is helpful to users if the target element(s) are highlighted. The visual
styling of this highlight should be decided by the document author, because the
<a>SVG user agent</a> has no way to determine what changes would make the
elements more visible.</p>

<p>The CSS :target selector ([<a href="refs.html#ref-SELECTORS">SELECTORS</a>],
section 6.2.2) may be used in a stylesheet to provide alternate styling for
elements which are the target of links. For example:</p>

<edit:example href="images/linking/target.xml" image="no" link="no"/>

<h2 id="DOMInterfaces">DOM interfaces</h2>

<div class='ready-for-wg-review'>
Expand Down Expand Up @@ -768,16 +715,11 @@ <h3 id="InterfaceSVGViewElement">Interface SVGViewElement</h3>

<p>An <a>SVGViewElement</a> object represents a <a>'view'</a> element in the DOM.</p>

<pre class="idl">interface <b>SVGViewElement</b> : <a>SVGElement</a> {
[SameObject] readonly attribute <a>SVGStringList</a> <a href="linking.html#__svg__SVGViewElement__viewTarget">viewTarget</a>;
};
<pre class="idl">interface <b>SVGViewElement</b> : <a>SVGElement</a>;

<a>SVGViewElement</a> implements <a>SVGFitToViewBox</a>;
<a>SVGViewElement</a> implements <a>SVGZoomAndPan</a>;</pre>

<p>The <b id="__svg__SVGViewElement__viewTarget">viewTarget</b> IDL attribute
<a>reflects</a> the <a>'viewTarget'</a> content attribute.</p>

</edit:with>
</div>

Expand Down

0 comments on commit c1690ae

Please sign in to comment.