RTL not working in bootstrap5
I installed bootstrap with npm install bootstrap
and I am trying to customize it so I am importing the bootstrap file from
@import '../node_modules/bootstrap/scss/bootstrap';
but when I tried using ms-3 or me-3 and apply the rtl dir in html tag it doesn't swap the rules. Should I do something to enable it? Because I saw using bootstrap via cdn they provide a bootstrap-rtl.min.css but I dont find a rtl file when installing it via npm
4 Replies
Have you tried @ layers with it yet?
Should make it really easy to override if you do. (Generally asking)
no I haven't could you provide an example?
David Omotayo
LogRocket Blog
Control CSS cascade with cascade layers - LogRocket Blog
Use the CSS cascade layers @layer at-rule to address conflicts between selector specificity and order of appearance.
Kevin Powell
YouTube
No more specificity issues?! (or all new ones 🤔) - A look at CSS Ca...
Cascade layers are pretty much here, so it's time to learn how they work!
🔗 Links
✅ Stephanie Eckles article: https://www.smashingmagazine.com/2022/01/introduction-css-cascade-layers/
✅ Bramus' article: https://www.bram.us/2021/09/15/the-future-of-css-cascade-layers-css-at-layer/
✅ Una's video: https://www.youtube.com/watch?v=ilrPpSQJb3U
✅ ...