Currently, there is no gap between the "-" button and the quantity field. It shows up when I apply display: inline;
for .qib-container div.quantity
but inline
has one downside that I found out and possibly more. I expected both gaps to show up with inline-block
.
I would like to know why this happens and how to make this gap appear.
As far as aesthetics go, I prefer no gaps at all, but I already have a working solution for this, "with gaps" is just an alternate option.
https://jsfiddle.net/Lybwro64/
.qib-button {
line-height: 1.2;
display: inline-block;
margin: 0;
padding: 0;
box-sizing: border-box;
height: 35px;
width: 30px;
color: #000;
background: #e2e2e2;
border-color: #cac9c9;
vertical-align: top;
font-size: 16px;
letter-spacing: 0;
border-style: solid;
border-width: 1px;
transition: none;
border-radius: 2px;
}
.qib-container div.quantity {
float: none;
display: inline-block;
margin: 0;
padding: 0;
border: none;
width: auto;
}
.qib-container .quantity input.qty {
line-height: 1.2;
margin: 0;
padding: 0;
box-sizing: border-box;
height: 35px;
width: 45px;
min-height: unset;
min-width: unset;
box-shadow: none;
font-size: 15px;
border-style: solid;
border-color: #cac9c9;
border-width: 1px;
border-radius: 2px;
text-align: center
}
.screen-reader-text {
border: 0;
clip: rect(1px,1px,1px,1px);
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
}
<div class="qib-container">
<button type="button" class="minus qib-button">-</button><div class="quantity">
<label class="screen-reader-text" for="quantity_5d33c50739412">Stainless steel standoff - satin finish quantity</label> <input type="number" id="quantity_5d33c50739412" class="input-text qty text" step="1" min="1" max="" name="quantity" value="1" title="Qty" size="4" inputmode="numeric"></div>
<button type="button" class="plus qib-button">+</button></div>