Separate parserender test, small template additions and fixes

This commit is contained in:
metacryst
2024-05-02 15:38:02 -05:00
parent fae1797c1c
commit 99be6cba99
6 changed files with 78 additions and 59 deletions

View File

@@ -675,6 +675,10 @@ function extendHTMLElementWithStyleSetters() {
extendHTMLElementWithStyleSetters();
HTMLElement.prototype.padding = function(direction, value) {
if(!value) {
this.style.padding = direction;
}
const directionName = `padding${direction.charAt(0).toUpperCase()}${direction.slice(1)}`;
if (typeof value === 'number') {
this.style[directionName] = `${value}px`;