Skip to content

Commit

Permalink
Add element definition and content categories for custom tags
Browse files Browse the repository at this point in the history
Fixes #454.
  • Loading branch information
domenic committed Apr 4, 2016
1 parent 8bf28d4 commit 2ebe9d9
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/styles/respec-complement.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,9 @@ body.dfnEnabled dfn { cursor: pointer; }
padding-top: 0;
padding-bottom: 0;
}

/*
* From https://resources.whatwg.org/standard.css
*/
.element { background: #EEFFEE; color: black; margin: 0 0 1em -0.15em; padding: 0 1em 0.25em 1em; }
.element:not(:hover) > dt > :link, .element:not(:hover) > dt > :visited { color: inherit; text-decoration: none; }
42 changes: 42 additions & 0 deletions spec/custom/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,32 @@ <h3 id="custom-elements-core-concepts">Core concepts</h3>

<p>After a <a>custom element</a> is <a lt="create an element">created</a>, changing the value of the <code>is</code> <a href="https://dom.spec.whatwg.org/#concept-named-attribute">attribute</a> does not change the element's behavior.</p>

<p><a lt="custom tag">Custom tags</a> have the following element definition:</p>


<dl class="element">
<dt><a href="https://html.spec.whatwg.org/#concept-element-categories">Categories</a>:</dt>
<dd><a href="https://html.spec.whatwg.org/#flow-content-2">Flow content</a>.</dd>
<dd><a href="https://html.spec.whatwg.org/#phrasing-content-2">Phrasing content</a>.</dd>
<dd><a href="https://html.spec.whatwg.org/#palpable-content-2">Palpable content</a>.</dd>

<dt><a href="https://html.spec.whatwg.org/#concept-element-contexts">Contexts in which custom elements can be used</a>:</dt>
<dd>Where <a href="https://html.spec.whatwg.org/#phrasing-content-2">phrasing content</a> is expected.</dd>

<dt><a href="https://html.spec.whatwg.org/#concept-element-content-model">Content model</a>:</dt>
<dd><a href="https://html.spec.whatwg.org/#transparent">Transparent</a>.</dd>

<dt><a href="https://html.spec.whatwg.org/#concept-element-tag-omission">Tag omission in text/html</a>:</dt>
<dd>Neither tag is omissible.</dd>

<dt><a href="https://html.spec.whatwg.org/#concept-element-attributes">Content attributes</a>:</dt>
<dd><a href="https://html.spec.whatwg.org/#global-attributes">Global attributes</a>
<dd>Any attributes relevant to the element's functioning, as defined by the author</dd>

<dt><a href="https://html.spec.whatwg.org/#concept-element-dom">DOM interface</a>:</dt>
<dd>Supplied by the author (inherits from <a href="https://html.spec.whatwg.org/#htmlelement"><code>HTMLElement</code></a>).</dd>
</dl>

<p>A <a>custom tag</a> does not have any special meaning: it <a href="https://html.spec.whatwg.org/#represents">represents</a> its children. A <a>type extension</a> inherits the semantics of the element that it extends.</p>

<p>A <dfn id="valid-custom-element-name">valid custom element name</dfn> is a sequence of characters <var>name</var> that meets all of the following requirements:</p>
Expand Down Expand Up @@ -947,6 +973,22 @@ <h3>HTML+: Parsing XHTML documents</h3>

</section>

<section>
<h3>HTML+: Content Model Updates</h3>

<p class="monkeypatch">HTML has several sections that need to be updated when introducing a new element, or in this case class of elements. Those are:</p>

<ul class="monkeypatch">
<li><a href="https://html.spec.whatwg.org/#content-categories">The categories venn diagram</a>'s interactive list should include custom elements in phrasing and flow content.</li>
<li><a href="https://html.spec.whatwg.org/#flow-content-2">Flow content</a> should include custom elements</li>
<li><a href="https://html.spec.whatwg.org/#phrasing-content-2">Phrasing content</a> should include custom elements</li>
<li><a href="https://html.spec.whatwg.org/#palpable-content-2">Palpable content</a> should include custom elements</li>
<li><a href="https://html.spec.whatwg.org/#elements-3">The elements index</a> should include a row at the bottom for custom elements</li>
<li><a href="https://html.spec.whatwg.org/#element-content-categories">The element content categories index</a> should include custom elements in the flow content, phrasing content, and palpable content sections.</li>
</ul>

</section>

<section id="element-modifications-to-dom">
<h3>DOM+: Elements</h3>

Expand Down

0 comments on commit 2ebe9d9

Please sign in to comment.