Skip to content

Commit 757c884

Browse files
committed
Let <cxx-definition-section> be used from an include, and fix its shadow-dom styling.
Also fix its description.
1 parent c157cbe commit 757c884

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

definition-section.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414
-->
1515

1616
<!--
17-
Uses the HTML <table> content model, but automatically adds a number to
18-
the <caption>. Use this as <table is="cxx-table">, unlike the other custom
19-
elements.
17+
Use this as <dl is="cxx-definition-section"> to build the unusual "terms
18+
and definitions" section that gets numbered as if each term is a section,
19+
but doesn't make them show up in the table of contents.
2020
-->
2121
<polymer-element name="cxx-definition-section" extends="dl">
2222
<template>
2323
<style>
24-
dt { font-weight: bold; }
25-
dd { margin-left: 0; }
24+
polyfill-next-selector { content: 'dt'; }
25+
::content dt { font-weight: bold; }
26+
polyfill-next-selector { content: 'dd'; }
27+
::content dd { margin-left: 0; }
2628
</style>
2729

2830
<content></content>

definition-section.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ limitations under the License.
4343
dt.term_number = next_term_number++;
4444

4545
var template = importDocument.getElementById(
46-
'cxx-definition-section-term');
46+
'cxx-definition-section-term').cloneNode(true);
4747
template.removeAttribute('id');
4848
template.model = dt;
4949

0 commit comments

Comments
 (0)