Fragment "container": add 'gap' configuration and responsive behaviour

What is the problem you are trying to solve?

“Container” fragment can be configured as a “flex row” (or “flex column”). Actually Liferay allows to set corresponding css properties such as “align-items”, “justify-content”, “flex-wrap” but not “GAP” one.

This is a very useful (and sometimes lifesaver) feature to space items and is surely better than adding margins on each children element.

In addition, very often is common to use “flex-row” in desktop breakpoint but “flex-column” in mobile one. Actually is not possible to change behaviour between breakpoints, ad allowed for other properties such as color, margins, etc.

What is your project about? (e. g. Intranet, Partner Portal, Enterprise Website, etc)

Every website

What is your proposed solution? (optional)

As described above:

  1. Add “gap” configuration field when a “flex” behaviour is selected for “Container fragment”

  2. Add ability to change behaviour between breakpoint such other properties like text color and margins

2 Answers

2

1. Gap Configuration Alternative


2. Breakpoint-Specific Styling

  • Ability to Change Behavior: You can already modify properties like text color and margins for an element based on the viewing breakpoint (e.g., desktop, tablet, mobile).

Thank you but: 1) I can't ask customers to "remember" Clay css classes to manually add gap features. It would be as I'd ask them to add "d-flex" css class to make a DIV a "flex-row". Is a "developer" solution, not an Editor one. 2) I'm sorry but I already said that is possible to change colors and margins in responsive views but the issue is that is not possible to change other "Container" fragment configurations. For example is not possibile to set a Container to have a "flex row" behaviour in desktop and "flex-column" in mobile.

Thanks for the feedback @ldetomi. We like the first part of your proposal. Adding a “gap” field for Flex Containers is a great quick-win that will improve layout creation. We are planning to prioritize this specific feature soon. Regarding the second part (changing behavior/gap per viewport), it is more complex and requires a deeper UX/technical analysis. For now, we will focus on the general gap configuration and leave the responsive behavior for a broader future initiative.