Skip to content

Commit

Permalink
Use shim-shadowdom to get Polymer to fix '^' combinators for non-shad…
Browse files Browse the repository at this point in the history
…owdom browsers.

Polymer/old-docs-site#269
  • Loading branch information
jyasskin committed Feb 25, 2014
1 parent ee6db91 commit ba86c73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions base.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,19 @@ cxx-clause { page-break-before: always; }
cxx-clause, cxx-toc { margin-top: 3em; }
}

/* Rule pairs where the first has a '^' and the second doesn't, are intended
* to work both with and without the Shadow DOM polyfill. TODO(jyasskin):
* Figure out what the Polymer folks recommend instead of this. */

cxx-clause ^ header { font-size: 150%; }
cxx-clause header { font-size: 150%; }
cxx-toc ^ h1 { font-size: 150%; }
cxx-toc h1 { font-size: 150%; }
cxx-clause cxx-section ^ header { font-size: 117%; }
cxx-clause cxx-section header { font-size: 117%; }
cxx-clause cxx-section cxx-section ^ header { font-size: 100%; }
cxx-clause cxx-section cxx-section header { font-size: 100%; }

[data-bookmark-label] { bookmark-label: attr(data-bookmark-label); }
h1 { bookmark-level: 1; }
cxx-toc ^ h1 { bookmark-level: 2; }
cxx-toc h1 { bookmark-level: 2; }
cxx-clause h1 { bookmark-level: 2; }
cxx-clause cxx-section h1 { bookmark-level: 3; }
cxx-clause cxx-section cxx-section h1 { bookmark-level: 4; }

* ^ .section-number { string-set: current-section "§ " content(); }
* .section-number { string-set: current-section "§ " content(); }

p {margin-top: .5em; margin-bottom: .5em}
p:first-child, ul, ol {margin-top: 0}
Expand All @@ -93,8 +83,6 @@ pre > code { display: inline-block; }
@media print {
/* Generate page numbers in the table of contents. */
cxx-toc ^ a[href]::after { content: leader(" . ") target-counter(attr(href), page); }
cxx-toc a[href]::after { content: leader(" . ") target-counter(attr(href), page); }

cxx-footnote ^ aside { float: footnote; footnote-policy: line; }
cxx-footnote aside { float: footnote; footnote-policy: line; }
}
2 changes: 1 addition & 1 deletion framework.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
limitations under the License.
-->

<link rel="stylesheet" href="base.css"/>
<link rel="stylesheet" href="base.css" shim-shadowdom/>
<script src="promise-0.1.1.min.js"></script>
<!-- "../" selects the bower_components directory if this project was
itself installed through bower. -->
Expand Down

0 comments on commit ba86c73

Please sign in to comment.