css - Laravel 8 中的 Bootstrap V5 LTR 和 RTL
问题描述
当我切换到阿拉伯语(RTL)模式时,我试图在我的laravel 8 应用程序中同时使用Bootstrap V5 LTR 和 RTL,设计看起来很糟糕。我不知道为什么,因为我遵循了那里提到的所有说明......
这是我的代码:
资源/sass/app.scss
/* rtl:begin:options: {
"autoRename": true,
"stringMap":[
"name": "ltr-rtl",
"priority": 100,
"search": ["ltr"],
"replace": ["rtl"],
"options": {
"scope": "*",
"ignoreCase": false
}
]
} */
.ltr {
@import "~bootstrap/scss/bootstrap";
}
/*rtl:end:options*/
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins";
资源/视图/example.blade.php
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ (app()->isLocale('ar') ? 'rtl' : 'ltr') }}" class="ltr">
<head>
...
</head>
<body>
</html>