What you are seeing is that borders on different sides will split diagonally around the corner:
.border {
  border: 10px solid;
  border-top-color: forestgreen;
  border-right-color: gold;
  border-bottom-color: steelblue;
  border-left-color: firebrick;
  width: 40px;
  height: 40px;
}
<div class="border"></div>
 
 
This is a behavior many use to create CSS triangles
To overcome this I can find 2 solutions: borders on a wrapper element, or linear gradients:
Option 1: Wrapper elements
.wrapper {
  border-bottom: 10px solid steelblue;
  height: 40px;
  width: 50px;
}
.border {
  border-right:10px solid gold;
  height: 40px;
  width: 40px;
}
<div class="wrapper">
  <div class="border"></div>
</div>
 
 
Note how the wrapper element has height of 5px more then the child. This is essential for the borders to align.
Option 2: Linear Gradients
.border {
  border-bottom: 10px solid;
  border-right: 10px solid;
  border-image: linear-gradient(to top, steelblue, steelblue 10px, gold 5px, gold) 10;
  height: 40px;
  width: 40px;
}
<div class="border"></div>