JSFiddle - React, Tailwind, and code Playground
HTML
<fieldset style="background:red;">
<input name=a style="width:300px; max-width:80%;"value="doesn't work">
</fieldset>
<fieldset style="background:blue;">
<input name=b style="width:80%; max-width:300px;"value="work">
</fieldset>
<br>
<input name=c style="width:300px; max-width:80%;" value="work">
<input name=b style="width:80%; max-width:300px;"value="work">