Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to add spacing between columns in AEM grid

LikesAEM
Level 1
Level 1

We are on 6.5.3. Like in CSS/bootstrap, there is a property to add the spacing between grid columns. I would like to know if there is any way to achieve this in AEM Grid? We need to add some gaps to ensure content doesn't stick together when content is placed inside the column grids.

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@LikesAEM,

In a clean AEM project, you can manipulate the clientlib-grid/less/grid.less. Take a look at the latest AEM maven archtype project, https://github.com/adobe/aem-project-archetype/tree/98f3b4efa9834437881b31a336459abe6a89ad00/src/mai...

 

View solution in original post

3 Replies
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@LikesAEM,

In a clean AEM project, you can manipulate the clientlib-grid/less/grid.less. Take a look at the latest AEM maven archtype project, https://github.com/adobe/aem-project-archetype/tree/98f3b4efa9834437881b31a336459abe6a89ad00/src/mai...

 

View solution in original post

LikesAEM
Level 1
Level 1
Hi @BrianKasingli - yea, this is the option we have kept as last resort. But we would like to check if there is a declarative way from AEM grid, for example specifying the spacing in some property.
Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @LikesAEM,

.generate-offsets from the file /libs/wcm/foundation/clientlibs/grid/grid_base.less has the related definition. (This file is imported to our grid.less file)

See if you can make use of this in grid.less file based on your need.