I'm a CSS novice and I have encountered a scenario where I need to apply a CSS class only when another class is not present.
<div
class="border-solid p-2 bg-white mt-1 h-fit"
[ngClass]="SOME_CONDITION ? 'tile-container' : ''"
>
<div class='chart-container'>
<app-angular-component></app-angular-component>
</div>
</div>
If the tile-container class is present, then the chart-container class should not be applied. Vice versa, if the tile-container class is not present, then the chart-container class should be applied.
I am looking to achieve this using just CSS.
This seems like a common issue, but I haven't been able to find a specific answer that fits my current scenario.
How can I accomplish this?