How to enforce ".wa-grid" not to wrap containers? #178
-
If I have this code here:
This will wrap the containers when window gets reduced, but ideally I want it to keep all 6 containers enforced in one row? Any ideas for that? Like the Also, I find it a little confusing that something is a class while others are DOM elements? E.g. why isn't this grid here a Just for info, then I "normally" handle a case like this with a table - something like this:
But this must bne better to handle though "native" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @HovKlan-DH! To clarify, you need every element with a class of <div class="wa-gap-m">
<div class="showBorder"></div>
<div class="showBorder"></div>
<div class="showBorder"></div>
<div class="showBorder"></div>
<div class="showBorder"></div>
<div class="showBorder"></div>
</div>
That is an excellent point! We do plan to add docs explaining the decision process around this. In a nutshell, we try to use the most lightweight form that allows us to still expose a nice API for users. If something can be implemented as a utility class without it being a hassle to use, it will most likely be a utility class. However, many things (some would say the most interesting things 😀) cannot be implemented as utility classes without their usability taking a serious hit, i.e. requiring more work from you to use them. Either because they need extra attributes, or extra elements, or behavior, or all three. For the many such things, we usually go with a component (i.e. a We don't expect you to remember that distinction, and plan to improve the information architecture of our docs to make things easier to find without having to remember what syntax pattern they use. Hope this helps! 😊 |
Beta Was this translation helpful? Give feedback.
-
Hey, @HovKlan-DH! If you like the semantics of Out of the box, |
Beta Was this translation helpful? Give feedback.
Hi @HovKlan-DH!
To clarify, you need every element with a class of
showBorder
on the same line?If so, that’s actually the default behavior of the gap utilities, which you would place on the parent element (the same one you've used
wa-grid
on). E.g. assuming you want a medium gap: