basic public page
This commit is contained in:
@@ -508,6 +508,18 @@ HTMLElement.prototype.marginHorizontal = StyleFunction(function(value, unit = "p
|
||||
return this
|
||||
})
|
||||
|
||||
HTMLElement.prototype.borderVertical = StyleFunction(function(value) {
|
||||
this.style.borderTop = value
|
||||
this.style.borderBottom = value
|
||||
return this
|
||||
})
|
||||
|
||||
HTMLElement.prototype.borderHorizontal = StyleFunction(function(value) {
|
||||
this.style.borderRight = value
|
||||
this.style.borderLeft = value
|
||||
return this
|
||||
})
|
||||
|
||||
HTMLElement.prototype.fontSize = StyleFunction(function(value, unit = "px") {
|
||||
|
||||
switch(value) {
|
||||
@@ -643,10 +655,10 @@ HTMLElement.prototype.centerY = function () {
|
||||
return this;
|
||||
};
|
||||
|
||||
HTMLElement.prototype.alignVertical = function (value) {
|
||||
HTMLElement.prototype.verticalAlign = function (value) {
|
||||
const direction = getComputedStyle(this).flexDirection;
|
||||
if(!direction) {
|
||||
throw new Error("alignVertical can be only be used on HStacks or VStacks!")
|
||||
throw new Error("verticalAlign can be only be used on HStacks or VStacks!")
|
||||
}
|
||||
|
||||
if (direction === "column" || direction === "column-reverse") {
|
||||
@@ -657,10 +669,10 @@ HTMLElement.prototype.alignVertical = function (value) {
|
||||
return this
|
||||
}
|
||||
|
||||
HTMLElement.prototype.alignHorizontal = function (value) {
|
||||
HTMLElement.prototype.horizontalAlign = function (value) {
|
||||
const direction = getComputedStyle(this).flexDirection;
|
||||
if(!direction) {
|
||||
throw new Error("alignHorizontal can be only be used on HStacks or VStacks!")
|
||||
throw new Error("horizontalAlign can be only be used on HStacks or VStacks!")
|
||||
}
|
||||
|
||||
if (direction === "column" || direction === "column-reverse") {
|
||||
|
||||
Reference in New Issue
Block a user