Skip to content

Commit

Permalink
Cursors: mark <cursor> element deprecated, update other prose
Browse files Browse the repository at this point in the history
This is consistent with CSS fully supporting custom cursors, and with HTML specifically disallowing cursor references to cursor elements embedded in an HTML file.

Also add clarifying text to the Linking chapter on how to process URLs when the valid target can be either a specific element or an image file (i.e., cursor and mask properties).

Closes #174
  • Loading branch information
AmeliaBR committed Jul 28, 2016
1 parent 8b45093 commit 1b93678
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 28 deletions.
46 changes: 20 additions & 26 deletions master/interact.html
Expand Up @@ -792,26 +792,30 @@ <h2 id="Cursors">Cursors</h2>

<ul>
<li>Standard built-in cursors</li>
<li>Platform-specific custom cursors</li>
<li>Platform-independent custom cursors</li>
<li>Custom cursors</li>
</ul>

<p>The <a>'cursor property'</a> property is used to
specify which cursor to use. The <a>'cursor property'</a> property can be used to
reference standard built-in cursors by specifying a keyword
such as <em>crosshair</em> or a custom cursor. Custom cursors
are referenced via a <a>&lt;url&gt;</a> and can point to either an
external resource such as a platform-specific cursor file or to
a <a>'cursor element'</a> element, which can be
are defined by referencing an image that can be
used to define a platform-independent cursor.</p>

<p>When defining a platform-independent cursor file,
either the SVG or the PNG format are recommended,
because they support alpha transparency to define a cursor shape.
Cursor images ideally contain at least two colors so
that the cursor can be visible over most backgrounds.</p>


<div class="ready-for-wider-review">
<h3 id="CursorProperty">The effect of the <span class="property">'cursor'</span> property</h3>

<p class="note">See the CSS Basic User Interface Module Level 3 specification
for the definition of <a>'cursor property'</a>. [<a href="refs.html#ref-CSS3UI">CSS3UI</a>]</p>
for the definition of <a href="https://www.w3.org/TR/css-ui-3/#cursor">cursor</a>. [<a href="refs.html#ref-CSS3UI">CSS3UI</a>]</p>

<p>SVG uses the <a>'cursor property'</a> property to specify the type of cursor to
<p>The <a>'cursor property'</a> property specifies the type of cursor to
be displayed for the pointing device when it is over a region of an
element that is sensitive to pointer events, according to the value of
the <a>'pointer-events'</a> property. SVG extends the definition of
Expand All @@ -829,29 +833,17 @@ <h3 id="CursorProperty">The effect of the <span class="property">'cursor'</span>
</div>

<h3 id="CursorElement">The <span class="element-name">'cursor'</span> element</h3>

<p>The cursor element is deprecated, as the standard CSS <a>'cursor property'</a>
now supports custom image references.
User agents are required to support it in interactive SVG documents only.
</p>

<edit:with element='cursor'>

<p>The <a>'cursor element'</a> element can
be used to define a platform-independent custom cursor. A
recommended approach for defining a platform-independent custom
cursor is to create a PNG image [<a href="refs.html#ref-PNG">PNG</a>]
and define a <a>'cursor element'</a> element
that references the PNG image and identifies the exact position
within the image which is the pointer position (i.e., the hot spot).</p>

<p>The PNG format is recommended because it supports the
ability to define a transparency mask via an alpha channel. If
a different image format is used, this format should support
the definition of a transparency mask (two options: provide an
explicit alpha channel or use a particular pixel color to
indicate transparency). If the transparency mask can be
determined, the mask defines the shape of the cursor;
otherwise, the cursor is an opaque rectangle. Typically, the
other pixel information (e.g., the R, G and B channels) defines
the colors for those parts of the cursor which are not masked
out. Note that cursors usually contain at least two colors so
that the cursor can be visible over most backgrounds.</p>
be used to define an image for a platform-independent custom cursor,
and the offset from the image dimensions to the active cursor point.</p>

<edit:elementsummary name='cursor'/>

Expand All @@ -877,6 +869,8 @@ <h3 id="CursorElement">The <span class="element-name">'cursor'</span> element</h
<dd>
The x- and y-coordinates of the position in the cursor's coordinate system
which represents the precise position that is being pointed to.
These coordinates apply if coordinates are not specified
when the <a>'cursor element'</a> is referenced.
</dd>
<dt>
<table class="attrdef def">
Expand Down
13 changes: 11 additions & 2 deletions master/linking.html
Expand Up @@ -670,13 +670,22 @@ <h4 id="processingURL-validity">Valid URL targets</h4>
<!--
<li>the <a href="color.html#ColorProfileSrcProperty">'src'</a> descriptor on an @color-profile definition must reference an ICC profile resource</li>
-->
<li>the <a>'cursor property'</a> property must reference a resource that can provide an image for the cursor graphic</li>
<li>the <a>'cursor property'</a> property must reference either a <a>'cursor element'</a> element or a document that can be processed as an image</li>
<li>the <a>'fill'</a> property (see <a href="painting.html#SpecifyingPaint">Specifying paint</a> for reference rules)</li>
<li>the <a>'marker property'</a>, <a>'marker-start'</a>, <a>'marker-mid'</a> and <a>'marker-end'</a> properties must reference a <a>'marker element'</a> element.</li>
<li>the <a>'stroke'</a> property (see <a href="painting.html#SpecifyingPaint">Specifying paint</a> for reference rules)</li>
</ul>

<p>If the resolved target element type (or document type) is not allowed for the URL reference,
<p>
For references that allow either a reference to a target element, or to an image file
(such as the <a>'cursor property'</a> and <a>'mask property'</a>),
the user agent must identify the target element and determine whether it is a valid target.
If the resolved target element is not an allowed element type,
the referenced resource is the entire document file;
the target fragment is used in processing that file as with any other image.
</p>

<p>In all other cases, if the resolved target element type (or document type) is not allowed for the URL reference,
it is an <a>invalid reference</a>.
</p>

Expand Down

0 comments on commit 1b93678

Please sign in to comment.