Skip to content

Commit

Permalink
[Fix #402] Use dfn.js for backlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
hayatoito committed Mar 1, 2016
1 parent 16f1825 commit 39d2aed
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions assets/styles/respec-complement.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,26 @@ var {
color: #005A9C;
font-style: normal;
}

/*
* From https://resources.whatwg.org/standard.css
* Styles used in https://resources.whatwg.org/dfn.js
*/
body.dfnEnabled dfn { cursor: pointer; }
.dfnPanel {
display: inline;
position: absolute;
z-index: 35;
height: auto;
width: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: #DDDDDD;
color: black;
border: outset 0.2em;
}
.dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
.dfnPanel :link, .dfnPanel :visited { color: black; }
.dfnPanel p:not(.spec-link) { font-weight: bolder; }
.dfnPanel * + p { margin-top: 0.25em; }
.dfnPanel li { list-style-position: inside; }
8 changes: 8 additions & 0 deletions spec/shadow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
<script src='../../assets/scripts/autolink.js' class='remove'></script>
<link rel="stylesheet" href="../../assets/styles/respec-complement.css" type="text/css" />
<script src='//www.w3.org/Tools/respec/respec-w3c-common' async class='remove'></script>
<script src='//resources.whatwg.org/dfn.js' defer class='remove'></script>
<script class='remove'>
function resolveBacklink() {
// For dfn.js
if (window.initDfn) {
initDfn();
}
}
var respecConfig = {
specStatus: "ED",
shortName: "shadow-dom",
Expand All @@ -31,6 +38,7 @@
}
],
preProcess: [resolveAutolink],
postProcess: [resolveBacklink],
localBiblio: {
"EDITING": {
title: "HTML Editing APIs",
Expand Down

0 comments on commit 39d2aed

Please sign in to comment.