JSFiddle - React, Tailwind, and code Playground
by aastudio
HTML
<input
type="text"
placeholder="without box-sizing">
<input
type="text"
placeholder="with box-sizing">
CSS
body {
width: 200px;
margin: 0 auto;
border-left: 1px #ccf solid;
border-right: 1px #ccf solid;
}
input {
width: 100%;
padding: 10px;
margin: 30px 0;
font-size: 1em;
}
input + input {
box-sizing: border-box;
}