Can this be improved?
Code 1
https://jsfiddle.net/Lzqko342/
.box {
width: 170px;
--coloration: teal 0 5px, black 0 10px, orange 0 15px, black 0 20px;
background:
repeating-linear-gradient(0deg, var(--coloration)) top,
repeating-linear-gradient(180deg, var(--coloration)) bottom;
background-size: 100% 50%;
background-repeat: no-repeat;
}
.box::before {
content: "";
display: block;
padding-top: 100%;
background: inherit;
clip-path: polygon(0 0, 100% 0, 0 100%, 100% 100%);
transform: rotate(90deg);
}
I was able to do this:
Can it be improved further?
Code 2
https://jsfiddle.net/0cdyj9g1/
.box {
width: 170px;
background: repeating-linear-gradient(teal 0 5px, black 0 10px, orange 0 15px, black 0 20px);
background-size: 100% 50%;
}
.box::before {
content: "";
display: block;
padding-top: 100%;
background: inherit;
clip-path: polygon(0 0, 100% 0, 0 100%, 100% 100%);
transform: rotate(90deg);
}
Next I was able to do this.
or maybe this one could be improved further?
Code 3
https://jsfiddle.net/1g82xkpj/
.box {
width: 170px;
background:
repeating-linear-gradient(0deg, teal 0 5px, black 0 10px, orange 0 15px, black 0 20px) top,
repeating-linear-gradient(180deg, teal 0 5px, black 0 10px, orange 0 15px, black 0 20px) bottom;
background-size: 100% 50%;
background-repeat: no-repeat;
}
.box::before {
content: "";
display: block;
padding-top: 100%;
background: inherit;
clip-path: polygon(0 0, 100% 0, 0 100%, 100% 100%);
transform: rotate(90deg);
}