I am currently getting used to all the bootstrap classes. One that I cant seem to figure is left margin, so I know I can do mt-3 etc for top margin, mx-3 for left and right margin but what is the class for left margin only please?
ms for start so ms-3 would be left. me for end so me-3 for right.
Bootstrap recently changed these. They used to be ml (left) and mr (right) but for the new option of RTL available for website with word flow from right to left they thought it more logical to use start and end.
From your mouth to god’s ears! What I really hate is that right now my sites are roughly split about 80%/20% between Bootstrap 4.x and 5.x, so when I bounce back and forth from doing edits to 4.x sites and new builds, I have to keep reminding myself, “duh, you’re in 5.x, you have to use ms (margin start), not ml (margin left).”
IMO this was an illogical decision on their part. They’ve created a disparity between CSS and the their utility classes. CSS still uses text-align: left and text-align: right , float: leftfloat: right and margin and padding are still expressed as top, right, bottom, left. AFAIK, start and end are pretty much limited to flexbox.
Yes, that is the only way to add utility classes to BSS Components.
EDIT: My bad… I forgot about the margin/padding icon. It’s a fairly recent addition to BSS which I haven’t grown accustomed to using. You can add margin and padding utility classes by clicking the Resize Margin/Padding icon, selecting utility class from the drop down, and then use the mouse to drag the margin/padding to what you want. Personally, I find it quicker to just type the classes into the Attribute panel (especially if you want to add the same classes to multiple component.)