#612 --global-se-spin-input-width to handle numberspinbox width changes

master
agriyadev5 2021-08-19 12:57:08 +05:30
parent 9d56df3c8c
commit b905f4ac4c
1 changed files with 2 additions and 6 deletions

View File

@ -9,8 +9,7 @@ template.innerHTML = `
padding: 3px;
}
div.imginside {
--se-spin-input-width: var(--global-se-spin-input-width);
width: var(--se-spin-input-width);
width: var(--global-se-spin-input-width);
}
img {
position: relative;
@ -73,7 +72,7 @@ export class SESpinInput extends HTMLElement {
* @returns {any} observed
*/
static get observedAttributes () {
return [ 'value', 'label', 'src', 'size', 'min', 'max', 'step', 'width' ];
return [ 'value', 'label', 'src', 'size', 'min', 'max', 'step' ];
}
/**
* @function attributeChangedCallback
@ -90,9 +89,6 @@ export class SESpinInput extends HTMLElement {
this.$label.remove();
this.$div.classList.add('imginside');
break;
case 'width':
this.$div.style.setProperty('--se-spin-input-width', newValue + 'px');
break;
case 'size':
// access to the underlying input box
this.$input.shadowRoot.getElementById('input').size = newValue;