Remove Utility in RTL

Sometimes RTL styling may be difficult to use for some edge cases therefore Bootstrap 5 provides us this facility to drop the utilities from RTL output by setting the RTL option to false.

RTL option:

This option allows us to disable the RTL styling for specific utilities. Let’s see the syntax to remove the RTL styling for the float utility.

Syntax:

$utilities: (
"float": (
rtl: false
),
);

Bootstrap 5 Using the API Remove utilities

Bootstrap 5 provides a set of utility classes for various use cases and with them Bootstrap also provides a utility API to modify, add or remove these utility classes by using Sass. This utility API is based on the Sass maps named $utility. We create our own $utility map and merge it with the default one. Along with adding and modifying utility APIs, Bootstrap provides remove API to remove any of the default utility classes. In this article, we’ll see everything about Bootstrap removing utility APIs.

Similar Reads

Remove Utility in RTL

Sometimes RTL styling may be difficult to use for some edge cases therefore Bootstrap 5 provides us this facility to drop the utilities from RTL output by setting the RTL option to false....

Ways to remove the utility:

using map-remove(): It accepts multiple arguments. The first argument should be the $utility map followed by the name of the classes to be removed from the $utilities map. using map-merge(): Here to remove the utility we set the key of the $utilities map to null. It accepts two maps. The first one is the $utilities map and the second is the new map....

Steps to Use Bootstrap 5 API Remove Utilities

Step 1: Initiate Node Package Modules using the below CLI command....