Skip to content

Commit

Permalink
Remove stylsheet adoption
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellBo committed Dec 8, 2024
1 parent f7d5bac commit 2396cf1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bibhtml/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@celine/bibhtml",
"version": "1.1.0",
"version": "1.2.0",
"license": "MIT",
"exports": "./mod.ts"
}
6 changes: 3 additions & 3 deletions bibhtml/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ <h1>@celine/bibhtml</h1>
<th>JSR</th>
<td class="width-auto"><a href="https://jsr.io/@celine/bibhtml">jsr.io/<wbr>@celine/<wbr>bibhtml</a> + <a href="https://jsr.io/@celine/bibhtml/doc">/docs</a></td>
<th>Version</th>
<td class="width-min"><a href="https://jsr.io/@celine/bibhtml/versions" id="version">1.0.0</a><sup>β</sup>, <time id="updated">Nov 29 2024</time></td>
<td class="width-min"><a href="https://jsr.io/@celine/bibhtml/versions" id="version">1.0.0</a>, <time id="updated">Nov 29 2024</time></td>
</tr>
<script type="module">
fetch("https://npm.jsr.io/@jsr/celine__bibhtml")
Expand Down Expand Up @@ -200,7 +200,7 @@ <h3><code>&lt;bh-cite&gt;</code></h3>
</p>

<p>
This permits us to cite references with flexible inline citation formatting <span id="flex-1-container">like <sup><bh-cite><a href="#birolEtAl2013">(#?)</a></bh-cite></sup></span>
This permits us to change the formatting of the inline citation, perhaps to use parentheses, like <span id="flex-1-container">like <sup><bh-cite><a href="#birolEtAl2013">(#?)</a></bh-cite></sup></span>.
</p>

<script id="flex-1-cell" type="module">
Expand Down Expand Up @@ -273,7 +273,7 @@ <h4>BibTeX</h4>
</script>

<p>
This expands to reference <bh-cite><a href="crichton2021nota">[#?]</a></bh-cite>, and is backed by <a href="https://www.npmjs.com/package/@citation-js/plugin-bibtex">@citation-js/plugin-bibtex</a>.
This expands to reference <bh-cite><a href="#crichton2021nota">[#?]</a></bh-cite>, and is backed by <a href="https://www.npmjs.com/package/@citation-js/plugin-bibtex">@citation-js/plugin-bibtex</a>.
</p>

<h3>Unstructured text</h3>
Expand Down
4 changes: 0 additions & 4 deletions bibhtml/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ export class BibhtmlCite extends HTMLElement {
// build a shadow root if it doesn't exist
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
const documentSheets = [...document.styleSheets];
this.shadowRoot!.adoptedStyleSheets = documentSheets;
}

// clone light DOM into shadow DOM
Expand Down Expand Up @@ -133,8 +131,6 @@ export class BibhtmlReference extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: 'open' });
const documentSheets = [...document.styleSheets];
this.shadowRoot!.adoptedStyleSheets = documentSheets;
this._citation = null;
this._notifiedBibliography = false;

Expand Down

0 comments on commit 2396cf1

Please sign in to comment.