As part of my coding routine, I often utilize the following code snippet to center specific content:
<!-- horizontal -->
<div class="d-flex align-items-center justify-content-center h-100">
..
</div>
<!-- vertical -->
<div class="d-flex align-items-center justify-content-center h-100 flex-column">
..
</div>
Is there a way to streamline or extend this code for reuse? For instance, can I create a class like 'my-centered-container-vertical' that simply adds the 'flex-column' property to 'my-centered-container', without repeating the entire code block?
<div class="my-centered-container">
</div
<div class="my-centered-container-vertical">
</div