Html – Why does CSS ::part override JavaScript element.style?
I have an HTML custom element that inherits from HTMLElement. The template contains: <input type="text" part="input"/> Sample CSS: my-element::part(input) { padding-right: 1px; } Sample JavaScript (inside class MyElement {}): this.input.style.paddingRight = "25px"; The Style inspector in DevTools (Rules in Firefox)…