Can SCSS be used to determine if an element is empty?
For instance, I'm interested in assigning a variable based on whether the class has content or not.
<div class="defaultClass">
<!-- This div is empty -->
</div>
Is there a way to do something like this:
$variable: 100%;
.defaultClass {
@if & is not empty {
$variable: 50%;
}
}