Adding location pin, location input
This commit is contained in:
@@ -313,6 +313,22 @@ HTMLElement.prototype.padding = function(one, two, three = "px") {
|
||||
return this
|
||||
}
|
||||
|
||||
HTMLElement.prototype.paddingVertical = 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
|
||||
this.style.paddingBottom = value + unit
|
||||
return this
|
||||
}
|
||||
|
||||
HTMLElement.prototype.paddingHorizontal = 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
|
||||
this.style.paddingLeft = value + unit
|
||||
return this
|
||||
}
|
||||
|
||||
HTMLElement.prototype.margin = function(direction, value, unit = "px") {
|
||||
if (!value) {
|
||||
this.style.margin = direction;
|
||||
@@ -503,6 +519,20 @@ HTMLElement.prototype.gap = function(value, unit = "px") {
|
||||
return this
|
||||
}
|
||||
|
||||
HTMLElement.prototype.backgroundImage = function (...values) {
|
||||
const formatted = values
|
||||
.map(v => {
|
||||
if(v.includes("/") && !v.includes("gradient")) {
|
||||
v = "url(" + v + ")"
|
||||
}
|
||||
return String(v).trim();
|
||||
})
|
||||
.join(", ");
|
||||
|
||||
this.style.backgroundImage = formatted;
|
||||
return this;
|
||||
};
|
||||
|
||||
/* Elements */
|
||||
|
||||
quill.setChildren = function(el, innerContent) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
:root {
|
||||
--main: #FFDFB4;
|
||||
--accent: black;
|
||||
--accent: var(--darkbrown);
|
||||
|
||||
--tan: #FFDFB4;
|
||||
--purple: #251D44;
|
||||
@@ -11,7 +11,7 @@
|
||||
--orange: #FE9201;
|
||||
--periwinkle: #655BAF;
|
||||
|
||||
--accent2: var(--green);
|
||||
--accent2: var(--brown);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@@ -84,3 +84,16 @@ button {
|
||||
padding: 1em;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
input {
|
||||
background-color: transparent;
|
||||
border: 1px solid var(--accent2);
|
||||
padding-left: 1em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: 1px solid var(--red);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user