Начат фронтенд

This commit is contained in:
Georgiy Syralev
2025-09-16 14:47:30 +03:00
parent f37e85e2e0
commit 40de29041d
2100 changed files with 305701 additions and 11807 deletions

View File

@@ -6,11 +6,9 @@ function regexp(name) {
}
class Intrinsic extends Value {
add(decl, prefix) {
if (decl.prop.includes('grid') && prefix !== '-webkit-') {
return undefined
}
return super.add(decl, prefix)
regexp() {
if (!this.regexpCache) this.regexpCache = regexp(this.name)
return this.regexpCache
}
isStretch() {
@@ -21,6 +19,16 @@ class Intrinsic extends Value {
)
}
replace(string, prefix) {
if (prefix === '-moz-' && this.isStretch()) {
return string.replace(this.regexp(), '$1-moz-available$3')
}
if (prefix === '-webkit-' && this.isStretch()) {
return string.replace(this.regexp(), '$1-webkit-fill-available$3')
}
return super.replace(string, prefix)
}
old(prefix) {
let prefixed = prefix + this.name
if (this.isStretch()) {
@@ -33,19 +41,11 @@ class Intrinsic extends Value {
return new OldValue(this.name, prefixed, prefixed, regexp(prefixed))
}
regexp() {
if (!this.regexpCache) this.regexpCache = regexp(this.name)
return this.regexpCache
}
replace(string, prefix) {
if (prefix === '-moz-' && this.isStretch()) {
return string.replace(this.regexp(), '$1-moz-available$3')
add(decl, prefix) {
if (decl.prop.includes('grid') && prefix !== '-webkit-') {
return undefined
}
if (prefix === '-webkit-' && this.isStretch()) {
return string.replace(this.regexp(), '$1-webkit-fill-available$3')
}
return super.replace(string, prefix)
return super.add(decl, prefix)
}
}