Centered Images
When using the Image Component, images are always left-aligned. If you'd like to center the image within the container you can utilize two classes to achieve this effect.
It's important to note that if the image is large enough to fill the container, it always do so. If you want the image smaller, you either need to use a smaller image, or use the width field in the image component to change the max-width that it will be displayed at.
Spacing
In AEM, there is spacing built in to all elements and components. However, sometimes it is necessary to introduce other spacing.
Spacing in CSS can be utilized as margin, or padding. Depending on where you are adding this, results can differ and may not be what you expect. These are for advanced users only and any implementation should be thouroughly tested and checked before deployed for expected results.
Our spacing utilities follow the following pattern {spacing-type}{direction}-{value}
Spacing Type: Margin {m}
Margins are used to create space around elements, outside of any defined borders. In our utility class utilized by "m"
Margin Class Examples:
Spacing Type: Padding {p}
Padding is used to create space around an element's content, inside of any defined borders. In our utility class utilized by "p"
Padding Class Examples:
Since padding direction and values are similiar to margin, we are only providing a few padding examples to understand the differences between margin and padding itself.
Center Aligned Columns
When using a Column Control component you can add a utility class directly to the column control to center-align all content vertically to each-other within the column control.
align-items-center
Equal Height Columns
When using a Column Control component sometimes you want all of the columns to be of equal-height. This is particularly helpful if you have content within each column that has a background-color. You can add the following utility class to the column-control itself.
equal-height
Reverse Columns on Mobile
When using a Column Control component by default, column stack left-to-right on mobile into a singular column. Sometimes, it's beneficial for the user-experience to stack columns right-to-left on mobile. This utility class, applied directly to the column-control component allows you to do that.
To preview this effect, resize your browser window until content stacks into one column.
reverse-column