I have an element with a 1px border and a child element that has a background color causing the parent element's border to disappear when I zoom out my browser's zoom to 70-80%.
I've noticed it happens in Chrome and IE11 on a PC but not in Chrome on my MacBook Pro.
Here's a screenshot of the problem:
Below is the sample code: https://codepen.io/richfinelli/full/yvpRxW/
<section class="card__container">
<header class="card__header">
<h1>Title</h1>
</header>
<div class="card__value">850</div>
<footer class="card__footer">Lorem ipsum dolor sit amet.</footer>
</section>
css/scss:
.card__container {
border: 1px solid black;
display: flex;
flex-direction: column;
width: 300px;
margin: 10px auto;
align-items: stretch;
font-family: "source code pro";
color: darken(#cccccc, 60%);
}
.card__header {
background-color: lighten(hotpink, 10%);
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
h1 {
font-size: 2rem;
}
}
.card__value {
align-self: center;
padding: 50px 0;
color: hotpink;
font-size: 2rem;
}
.card__footer {
padding: 10px;
font-family: Arial;
font-style: italic;
font-size: .8rem;
background-color: lighten(blue, 45%);
}
Trying to figure out why my border is disappearing?