Cool CSS masked frame

by Arjan Haverkamp

HTML

<div class="bar">
  <img alt="background" class="chakra-image css-en-6ox10z"...

CSS

.bar {
  height: 112px;
  border-radius: 24px;
  background-color: #0e43a4;
  box-shadow: 0px 8px 32px 0px rgba(30, 41, 54, 0.12) ;
  position: relative;
  overflow: hidden;
}

.css-en-6ox10z {
  position: absolute; 
	filter: drop-shadow(rgba(30, 41, 54, 0.12) 2px 4px 6px) blur(7px);
	right: -100px;
	bottom: 0px;
	height: 120px;
}

.box::before {
	content: "";
	position: absolute;
	inset: 0px;
	padding: 1px;
	background: linear-gradient(146.69deg, rgba(255, 255, 255, 0.4) 7.36%, rgba(255, 255, 255, 0) 27.24%, rgba(255, 255, 255, 0.2) 93.77%);
	mask-mode: match-source, match-source;
	mask-repeat: repeat, repeat;
	mask-clip: content-box, border-box;
	mask-origin: content-box, border-box;
	mask-position: 0% 0%, 0% 0%;
	mask-size: auto, auto;
	mask-image: linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px), linear-gradient(rgb(255, 255, 255) 0px, rgb(255, 255, 255) 0px);
	mask-composite: exclude;
	pointer-events: none;
	border-radius: 20px;
}

.box {
  position: absolute;
  right: 1em;
  top: 1em;
  bottom: 1em;
	display: inline-block;
	-moz-box-align: center;
	background: linear-gradient(rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
	backdrop-filter: blur(14px);
	border-radius: 20px;
  color: #fff;
  padding: 20px 10px;
  font-family: sans-serif;
}