"relref",
"rgba",
"roboto",
- "RTLCSS",
"ruleset",
"sassrc",
"screenreaders",
".cspell.json",
"dist/",
"*.min.*",
- "**/*rtl*",
"**/tests/**"
],
"useGitignore": true
// }
// }
- // @include describe("rtl") {
- // @include it("sets up RTLCSS for removal when false") {
- // @include test-generate-utility(
- // (
- // property: padding,
- // values: 1rem,
- // rtl: false
- // )
- // ) {
- // /* rtl:begin:remove */
-
- // .padding-1rem {
- // padding: 1rem;
- // }
-
- // /* rtl:end:remove */
-
- // }
- // }
- // }
-
// @include describe("rfs") {
// @include it("sets the fluid value when not inside media query") {
// @include test-generate-utility(
margin-bottom: 1.5rem;
text-align: center;
}
-/* rtl:begin:ignore */
.marketing .lg\:col-4 p {
- margin-right: .75rem;
- margin-left: .75rem;
+ margin-inline: .75rem;
}
-/* rtl:end:ignore */
/* Featurettes
}
/* Thin out the marketing headings */
-/* rtl:begin:remove */
.featurette-heading {
letter-spacing: -.05rem;
}
-/* rtl:end:remove */
-
/* RESPONSIVE CSS
-------------------------------------------------- */
line-height: 0;
content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ccc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
transition: transform .35s ease;
-
- /* rtl:raw:
- transform: rotate(180deg) translateX(-2px);
- */
transform-origin: .5em 50%;
}
.bd-aside .btn[aria-expanded="true"]::before {
- transform: rotate(90deg)/* rtl:ignore */;
+ transform: rotate(90deg);
}
.bd-header {
position: fixed;
top: 0;
- /* rtl:begin:ignore */
right: 0;
left: 0;
- /* rtl:end:ignore */
z-index: 1030;
grid-column: 1 / span 3;
}
.bd-cheatsheet section > h2::before {
position: absolute;
- /* rtl:begin:ignore */
top: 0;
right: 0;
bottom: -2rem;
left: 0;
- /* rtl:end:ignore */
z-index: -1;
content: "";
}
`}
</script>
-### Starter template
-
-Here's a modified RTL starter template:
-
-```html
-<!doctype html>
-<html lang="ar" dir="rtl">
- <head>
- <!-- Required meta tags -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
- <!-- Bootstrap CSS -->
- <link rel="stylesheet" href="[[config:cdn.css]]" integrity="[[config:cdn.css_hash]]" crossorigin="anonymous">
-
- <title>مرحبًا بالعالم!</title>
- </head>
- <body>
- <h1>مرحبًا بالعالم!</h1>
-
- <!-- Optional JavaScript; choose one of the two! -->
-
- <!-- Option 1: Bootstrap Bundle with Floating UI and Vanilla Calendar Pro -->
- <script type="module" src="[[config:cdn.js_bundle]]" integrity="[[config:cdn.js_bundle_hash]]" crossorigin="anonymous"></script>
-
- <!-- Option 2: Separate Floating UI, Vanilla Calendar Pro, and Bootstrap JS via import map -->
- <!--
- <script type="importmap">
- {
- "imports": {
- "@floating-ui/dom": "[[config:cdn.floating_ui_esm]]",
- "vanilla-calendar-pro": "[[config:cdn.vanilla_calendar_pro_esm]]"
- }
- }
- </script>
- <script type="module" src="[[config:cdn.js]]" integrity="[[config:cdn.js_hash]]" crossorigin="anonymous"></script>
- -->
- </body>
-</html>
-```
-
## Switching directions
**Need both LTR and RTL on the same page?** Wrap your content in containers with different `dir` attributes:
<body>
<!-- LTR content -->
<div dir="ltr" lang="en">
- <h1>This is left-to-right text</h1>
- <p>Content flows from left to right.</p>
+ <!-- … -->
</div>
<!-- RTL content -->
<div dir="rtl" lang="ar">
- <h1>هذا نص من اليمين إلى اليسار</h1>
- <p>المحتوى يتدفق من اليمين إلى اليسار.</p>
+ <!-- … -->
</div>
</body>
</html>
| [`responsive`](#responsive) | Optional | `false` | Boolean indicating if responsive classes should be generated. |
| [`important`](#importance) | Optional | `false` | Boolean indicating if `!important` should be added to the utility's CSS rules. |
| [`print`](#print) | Optional | `false` | Boolean indicating if print classes need to be generated. |
-| `rtl` | Optional | `true` | Boolean indicating if utility should be kept in RTL. |
</BsTable>
## API explained
<Example code={`<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p>`} />
-<Callout type="warning">
-Note that [breaking words isn't possible in Arabic](https://rtlstyling.com/posts/rtl-styling#3.-line-break), which is the most used RTL language. Therefore `.text-break` is removed from our RTL compiled CSS.
-</Callout>
-
## CSS
### Sass utilities API
property: word-wrap word-break,
class: text,
values: (break: break-word),
- rtl: false
),
```
<Example code={`<p class="text-break">mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm</p>`} />
-<Callout type="warning">
-Note that [breaking words isn't possible in Arabic](https://rtlstyling.com/posts/rtl-styling#3.-line-break), which is the most used RTL language. Therefore `.text-break` is removed from our RTL compiled CSS.
-</Callout>
-
## CSS
### Sass utilities API