JSFiddle - React, Tailwind, and code Playground

by fristyr

HTML

<div class="wrapper">
  <div class="left">
    <div class="leftBox"></div>
  </div>
  <div class="right">
    <div class="rightBox"></div>
  </div>
</div>

CSS

body {
  margin: 0;
}

.wrapper {
  width: 100%;
  height: 100vh;
	background: linear-gradient(90deg,#343434 50%,#fff 0);
  display: flex;
}

.left {
  width: 50%;
  position: relative;
}

.right {
  width: 50%;
  position: relative;
}

.rightBox {
  width: 300px;
  height: 250px;
  border-left: 2px solid white;
	border-right: 2px solid black;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
}

.rightBox::before,
.rightBox::after{
	content: '';
	position: absolute;
	background: green;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg,#f8f7f7 50%,#343434 0);
}

.rightBox::before {
	top: 0;
}

.rightBox::after {
	bottom: 0;
}

.leftBox {
  width: 270px;
  height: 170px;
  border: 2px solid white;
  position: absolute;
  top: 50%;
  right: 0;
  border-right: none;
  transform: translate(0, -50%);
}