I'm creating a multi-format editable date/time widget, and I just noticed how a divider line in one widget looked fatter than the same line other widgets (fatter in the one with the red text):
Here's the CSS for that:
.tbw-dse-divider {
align-self: stretch;
background-color: #A6A6A6;
margin: 0 max(1px, 0.0836em);
overflow: hidden;
position: relative;
white-space: nowrap;
width: max(1px, 0.0836em);
}
If I tweak this CSS by moving the position of the divider half a pixel with left: 0.5px
, that one divider gets thinner, and the others get fatter:
According to the web console, this line is rendered at 2.5px wide. I'm guessing this is some sort of round-off error, where sometimes I get 2 pixels, sometimes I get 3 pixels.
Neither Firefox nor Safari have this problem, and the divider's appearance is always consistent. The screenshot is from a high-res screen, so it should be easily possible to render half of a px
cleanly.
Does anyone know a way to fix this Chrome width-rounding problem?
As rendered by Firefox: