<!DOCTYPE html>
<html>
<head>
<style>
custom-element {
display: block;
border: 2px solid black;
height: 100px;
width: 300px;
padding: 15px;
position: relative;
}
custom-element:not(:defined) {
border-color: grey;
color: grey;
}
custom-element:defined {
background-color: salmon;
border-color: maroon;
color: black;
}
custom-element:not(:defined)::before {
content: "Loading...";
position: absolute;
inset: 0 0 0 0;
align-content: center;
text-align: center;
font-size: 25px;
background-color: white;
}
custom-element:defined::before {
content: "";
}
</style>
</head>
<body>
<h1>Demo of :defined</h1>
<custom-element>
<p>Loaded content: Lorem ipsum tel sed tellus eiusmod tellus. Aenean. Semper dolor sit nisi. Elit porttitor nisi sit vivamus.</p>