fix custom fonts in sandboxed docs;

`@import` must be at the very start of a `<style>` tag

Reported-by: @thaddeuskkr (thx!)
This commit is contained in:
ed 2024-08-14 15:30:04 +00:00
parent 687df2fabd
commit 5a62cb4869

View file

@ -8030,7 +8030,7 @@ function sandbox(tgt, rules, cls, html) {
}
html = '<html class="iframe ' + document.documentElement.className +
'"><head><style>html{background:#eee;color:#000}\n' + globalcss() +
'"><head><style>html{background:#eee;color:#000}</style><style>' + globalcss() +
'</style><base target="_parent"></head><body id="b" class="logue ' + cls + '">' + html +
'<script>' + env + '</script>' + sandboxjs() +
'<script>var d=document.documentElement,TS="' + TS + '",' +