adding search bar to appz
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user