Any particular reason for Bootstrap v5 switching class names from .ml .mr to .ms .me?

I'm curious if anyone can explain the reasoning behind Bootstrap v5 changing the names of classes that are widely used?

Answer №1

One of the main reasons behind their decision was the implementation of the RTL feature:

Bootstrap's approach to adding RTL support was focused on creating a future-friendly solution for both themselves and the larger web community. This involved embracing CSS logical properties by renaming various classes and variables. While this change was risky due to its scale and impact, it was done with the hope that users would see the benefits in the long run!

Many users were already familiar with logical properties through Bootstrap's flex utilities, which replaced traditional directional properties like left and right with start and end. New additions like align-items-end were well-received, making horizontal direction classes suitable for both LTR and RTL layouts without additional complexity.

For instance, instead of using .ml-3 for margin-left in an LTR context, users should now use .ms-3.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Enhance your PrimeNG p-calendar by customizing the background-color of the dates

Hello, I am currently attempting to customize the appearance of the p-calendar, but I am struggling with changing the color of the displayed dates. Can anyone provide assistance? Thank you in advance. Below is my template: <div class="p-field p-co ...

Display an image with text that appears on hover along with a change in opacity

Is there a way to make the hover effect on an image display with opacity while keeping the text inside unaffected by the opacity style? The image is housed within an input tag, and when clicked, a bootstrap modal will appear with an input form. .img_wra ...

The bold horizontal line in HTML tables is a bit unusual and is caused by the border-collapse property

Edit 1: The strange issue appears to be related to the border-collapse property in CSS, as it can be resolved by using border-spacing: 0px. However, the question remains, why does border-collapse result in this behavior? It seems to be connected to scaling ...

Separate the label and content sections in an Angular Material vertical stepper

https://i.sstatic.net/S1gIH.jpg After applying the following CSS: mat-step-header{ display: flex ; justify-content: flex-end ; } I am attempting to make this stepper function properly. I have implemented Angular Material design for a vertical stepp ...

Add some text onto the Box Component in Material UI

I am looking to replicate the hover functionality (UI) seen in this example: Desired UI Source: Since adjusting background image styles can be complex, I have opted to use the Box Component from Material UI. Within the Box Component, I have implemented th ...

Creating a grid cell that spans the entire grid width

Snippet of CSS Code: .wrapper { display: grid; position: relative; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 25vh; width: 100%; } .prova { border: 1px solid; } .wrapper div:nth-child(2) { grid-column: 3; grid-row: 2 / 4; ...

Tips for customizing column width in v-simple-table with Vuetify.js component

For my most recent projects UI component, I decided to use vuetify.js. I attempted to adjust the width of the th and td elements within a v-simple-table using CSS, but unfortunately, nothing seemed to happen. My goal was to set the width of every th and td ...

Conceal YouTube upon opening any model or light box

I have a YouTube video in the center of my page, and when I click on any link from the side navigation, a lightbox appears. However, in IE, the lightbox is behind the YouTube video. I have tried setting the Z-index, but it doesn't seem to work. Is the ...

Implementing a Timer on an HTML Page with JavaScript

I am looking to add a timer to my HTML page using JavaScript. The timer should get the selected date and time from an input field <input type="date" /> and control it. If the time difference between the current time and the selected time is less than ...

Contrasting one-finger scrolling versus dual-finger scrolling on a touch device with IE11

Can you explain the distinction between scrolling using one finger versus two fingers in IE11? I have noticed that I am able to scroll/pan the webpage with just one finger on certain elements, while on other elements, I need to use two fingers on a Micros ...

Tips for presenting a label and its value on separate lines while also displaying additional nested label-value pairs:

I have a specific request in mind, https://i.sstatic.net/aK5nG.png But the result I am seeing is different, https://i.sstatic.net/ajvhF.png Here's the code snippet, I'm utilizing bulma framework but encountering some challenges... <sectio ...

Ways to avoid text covering the button using CSS

Take a look at this image: https://i.sstatic.net/U7wGV.png In the image, you can see that I have entered text in the input box. However, since there is also a button placed inside the box, the text gets hidden behind it. Is there a way to prevent this i ...

Tips for preventing the overlap of two divs positioned absolutely within a div that is positioned relatively

I have a code snippet that works perfectly when there is enough space to display all the divs without overlapping. However, when I resize the page to its minimum, the two absolute positioned divs start to overlap. Is there a way to prevent this from happen ...

Adding an image in HTML from a different drive - step-by-step guide!

Currently, I am immersing myself in HTML, CSS, and JavaScript as I gear up for my upcoming school project centered around frontend development. Here's the issue I encountered. While attempting to insert an image into one of my HTML files, I ran into ...

What is the new Bootstrap equivalent for btn-group-justify?

Could someone help me align the 3 radio options in this HTML code to make them appear justified? I have already tried using d-flex and btn-group-justify without success. If anyone could provide a sample using only Bootstrap 4.1+, it would be greatly appre ...

Include a label within the Highcharts Gantt chart square

I'm struggling to include a label within each box in the Gantt Diagram Highcharts, and I'm unsure how to proceed. How can I display a value within each frame? The label needs to be positioned at the center of each box, and all the data is genera ...

Tips for concealing a collapsible navbar menu upon clicking elsewhere (Bootstrap 5)

I am trying to create a collapsible navbar menu: <div class="collapse navbar-collapse" id="navbarCollapsible"> .. menu items .. </div> My goal is to hide the menu whenever a user clicks outside of it (not just when click ...

What is the method for defining a CSS property for the ::before pseudo element within an Angular component?

Can TypeScript variables be accessed in SCSS code within an Angular component? I am looking to achieve the following: <style type="text/css"> .source-status-{{ event.status.id }}::before { border-left: 20px solid {{ event.status.colo ...

Picture in the form of a radio button

Is there a way to use an image instead of a radio button in my AngularJS form? I have managed to hide the radio button using CSS, but it disables the checked event. How can I make the image clickable? position: absolute; left: -9999px; Here is the code s ...

Ways to create a blurred effect on a button that is in a disabled state

Can a button be blurred when it is disabled? Are there any methods to achieve this effect? <button (click)="addRow()" class="add-row-btn" mat-button [disabled]="isDisabled"> Add Row</button> ...