Skip to content

Commit a64df69

Browse files
committed
Update to Polymer 0.2.1.
Change a bunch of 'attached' to the new 'domReady' event. Change ^ to /shadow/ to keep up with http://dev.w3.org/csswg/shadow-styling/ now that Polymer can polyfill it.
1 parent befaf22 commit a64df69

File tree

7 files changed

+15
-17
lines changed

7 files changed

+15
-17
lines changed

base.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ cxx-clause { page-break-before: always; }
5151
cxx-clause, cxx-toc { margin-top: 3em; }
5252
}
5353

54-
cxx-clause ^ header { font-size: 150%; }
55-
cxx-toc ^ h1 { font-size: 150%; }
56-
cxx-clause cxx-section ^ header { font-size: 117%; }
57-
cxx-clause cxx-section cxx-section ^ header { font-size: 100%; }
54+
cxx-clause /shadow/ header { font-size: 150%; }
55+
cxx-toc /shadow/ h1 { font-size: 150%; }
56+
cxx-clause cxx-section /shadow/ header { font-size: 117%; }
57+
cxx-clause cxx-section cxx-section /shadow/ header { font-size: 100%; }
5858

5959
[data-bookmark-label] { bookmark-label: attr(data-bookmark-label); }
6060
h1 { bookmark-level: 1; }
61-
cxx-toc ^ h1 { bookmark-level: 2; }
61+
cxx-toc /shadow/ h1 { bookmark-level: 2; }
6262
cxx-clause h1 { bookmark-level: 2; }
6363
cxx-clause cxx-section h1 { bookmark-level: 3; }
6464
cxx-clause cxx-section cxx-section h1 { bookmark-level: 4; }
6565

66-
* ^ .section-number { string-set: current-section "§ " content(); }
66+
* /shadow/ .section-number { string-set: current-section "§ " content(); }
6767

6868
p {margin-top: .5em; margin-bottom: .5em}
6969
p:first-child, ul, ol {margin-top: 0}
@@ -82,7 +82,7 @@ pre > code { display: inline-block; }
8282
inside the CSSOM. */
8383
@media print {
8484
/* Generate page numbers in the table of contents. */
85-
cxx-toc ^ a[href]::after { content: leader(" . ") target-counter(attr(href), page); }
85+
cxx-toc /shadow/ a[href]::after { content: leader(" . ") target-counter(attr(href), page); }
8686

87-
cxx-footnote ^ aside { float: footnote; footnote-policy: line; }
87+
cxx-footnote /shadow/ aside { float: footnote; footnote-policy: line; }
8888
}

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"tests"
1212
],
1313
"dependencies": {
14-
"polymer-ajax": "Polymer/polymer-ajax#0.2.0"
14+
"polymer-ajax": "Polymer/polymer-ajax#0.2.1"
1515
}
1616
}

clause.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
this.update_sec_nums(clause_num);
3030
},
3131

32-
attached: updateTocClauses,
32+
domReady: updateTocClauses,
3333
detached: updateTocClauses,
3434
});
3535
})();

figure.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
});
4040
}
4141
Polymer('cxx-figure', {
42-
attached: renumberFigures,
42+
domReady: renumberFigures,
4343
detached: renumberFigures,
4444
});
4545
})();

section.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@ limitations under the License.
4545
}
4646
},
4747

48-
attached: function() {
48+
domReady: function() {
4949
var title_element = this.querySelector('h1');
5050
if (title_element && title_element.parentElement == this)
5151
this.title_element = title_element;
5252

53-
// async() lets the descendant elements upgrade; after which we
54-
// need to traverse them to assign paragraph numbers.
55-
this.async(this.numberParagraphChildren);
53+
this.numberParagraphChildren();
5654
},
5755

5856
numberParagraphChildren: function(rootElement, para_num_start) {

table.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
});
5050
}
5151
Polymer('cxx-table', {
52-
attached: renumberTables,
52+
domReady: renumberTables,
5353
detached: renumberTables,
5454
});
5555
})();

toc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ limitations under the License.
4242
}, this);
4343
},
4444

45-
attached: function() {
45+
domReady: function() {
4646
this.clauses = document.querySelectorAll('cxx-clause');
4747
}
4848
})

0 commit comments

Comments
 (0)