Render d-math in all body (not just article) and remove contain: content optimizations in favor of contain: style

This commit is contained in:
Ludwig Schubert
2019-01-31 17:20:56 -08:00
parent c3ff605777
commit ebe56d2329
3 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -30,7 +30,7 @@ ${katexCSSTag}
:host {
display: inline-block;
contain: content;
contain: style;
}
:host([block]) {
@@ -73,8 +73,7 @@ export class DMath extends Mutating(T(HTMLElement)) {
}
// transform inline delimited math to d-math tags
if (DMath.katexOptions.delimiters) {
const article = document.querySelector('d-article');
renderMathInElement(article, DMath.katexOptions);
renderMathInElement(document.body, DMath.katexOptions);
}
}