chore: format

This commit is contained in:
CoolElectronics 2024-04-28 12:16:11 -04:00
parent 7de25670a0
commit 19ea5759df
No known key found for this signature in database
GPG key ID: F63593D168636C50
2 changed files with 3 additions and 4 deletions

View file

@ -5,7 +5,7 @@ export const cssmap = {}
/* POLYFILL.SCOPE.START */
let scopeSupported
function checkScopeSupported() {
if (scopeSupported) return true;
if (scopeSupported) return true
const style = document.createElement('style')
style.textContent = '@scope (.test) { :scope { color: red } }'
document.head.appendChild(style)
@ -19,7 +19,7 @@ function checkScopeSupported() {
document.body.removeChild(testElement)
scopeSupported = computedColor == 'rgb(255, 0, 0)'
return scopeSupported;
return scopeSupported
}
const depth = 50
// polyfills @scope for firefox and older browsers, using a :not selector recursively increasing in depth
@ -61,7 +61,7 @@ function parseCombinedCss(str) {
// compat layer for older browsers. when css nesting stablizes this can be removed
str += '\n'
for (; ;) {
for (;;) {
let [first, ...rest] = str.split('\n')
if (first.trim().endsWith('{')) break