adding search bar to appz

This commit is contained in:
metacryst
2025-10-29 18:52:23 -05:00
parent 0e36cd30cc
commit eaa90703a1
5 changed files with 118 additions and 19 deletions

View File

@@ -265,21 +265,29 @@ HTMLElement.prototype.padding = function(one, two, three = "px") {
};
HTMLElement.prototype.paddingTop = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.paddingTop = value + unit
return this
}
HTMLElement.prototype.paddingLeft = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.paddingLeft = value + unit
return this
}
HTMLElement.prototype.paddingBottom = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.paddingBottom = value + unit
return this
}
HTMLElement.prototype.paddingRight = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.paddingRight = value + unit
return this
}
@@ -309,21 +317,29 @@ HTMLElement.prototype.margin = function(direction, value, unit = "px") {
};
HTMLElement.prototype.marginTop = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.marginTop = value + unit
return this
}
HTMLElement.prototype.marginLeft = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.marginLeft = value + unit
return this
}
HTMLElement.prototype.marginBottom = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.marginBottom = value + unit
return this
}
HTMLElement.prototype.marginRight = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
this.style.marginRight = value + unit
return this
}
@@ -357,6 +373,9 @@ HTMLElement.prototype.minHeight = function(value, unit = "px") {
}
HTMLElement.prototype.fontSize = function(value, unit = "px") {
if ((typeof value !== 'number' && value !== "auto") || Number.isNaN(value))
throw new Error(`Invalid value: ${value}. Expected a number.`);
switch(value) {
case "6xl":
value = "3.75"; unit = "rem"