JSFiddle - React, Tailwind, and code Playground

HTML

I want to change the background color and image of a <code>input[type=text]</code> but do not touch the border. I want to have the browser dependant border.  <br/>
<input type="text" value='original'>
<input id='customBackground' type=text value='modified'>

JavaScript

// I am changing the backgroungImage too but it is not necessary to reproduce my situation.
var input = document.getElementById('customBackground');
input.style.backgroundColor = 'yellow';

// Restoring original border didn't work
//var style = window.getComputedStyle(input);
//input.style.backgroundColor = 'yellow';
//input.style.border = style.border;

// This is not 100% ok. Also very hacky
//input.style.border = 'thin solid gray' // Webkit browsers have the border thiner than this.
//input.style.border = 'thin solid black\9' // IE only