Skip to content

Commit b6e542b

Browse files
committed
feat: add RTL Bootstrap stylesheet support in head.html
1 parent 0dab58e commit b6e542b

File tree

2 files changed

+4
-102
lines changed

2 files changed

+4
-102
lines changed

_includes/head.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
7474
{% endunless %}
7575

76+
{% if dir and dir contains 'rtl' %}
77+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.rtl.min.css" integrity="sha384-MdqCcafa5BLgxBDJ3d/4D292geNL64JyRtSGjEszRUQX9rhL1QkcnId+OT7Yw+D+" crossorigin="anonymous">
78+
{% endif %}
79+
7680
<!-- Theme style -->
7781
<link rel="stylesheet" href="{{ '/assets/css/:THEME.css' | replace: ':THEME', site.theme | relative_url }}">
7882

_sass/base/_rtl.scss

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -474,108 +474,6 @@ html[dir='rtl'] {
474474
}
475475
}
476476

477-
/* Fix for Bootstrap components */
478-
.me-auto {
479-
margin-right: 0 !important;
480-
margin-left: auto !important;
481-
}
482-
483-
.me-sm-4 {
484-
@include bp.sm {
485-
margin-right: 0 !important;
486-
margin-left: 1.5rem !important;
487-
}
488-
}
489-
490-
.ms-1 {
491-
margin-left: 0 !important;
492-
margin-right: 0.25rem !important;
493-
}
494-
495-
.ms-2 {
496-
margin-left: 0 !important;
497-
margin-right: 0.5rem !important;
498-
}
499-
500-
.ms-3 {
501-
margin-left: 0 !important;
502-
margin-right: 1rem !important;
503-
}
504-
505-
.ms-4 {
506-
margin-left: 0 !important;
507-
margin-right: 1.5rem !important;
508-
}
509-
510-
.ms-lg-0 {
511-
@include bp.lg {
512-
margin-left: 0 !important;
513-
margin-right: 0 !important;
514-
}
515-
}
516-
517-
.me-1 {
518-
margin-right: 0 !important;
519-
margin-left: 0.25rem !important;
520-
}
521-
522-
.me-2 {
523-
margin-right: 0 !important;
524-
margin-left: 0.5rem !important;
525-
}
526-
527-
.me-3 {
528-
margin-right: 0 !important;
529-
margin-left: 1rem !important;
530-
}
531-
532-
.pe-1 {
533-
padding-right: 0 !important;
534-
padding-left: 0.25rem !important;
535-
}
536-
537-
.pe-2 {
538-
padding-right: 0 !important;
539-
padding-left: 0.5rem !important;
540-
}
541-
542-
.pe-4 {
543-
padding-right: 0 !important;
544-
padding-left: 1.5rem !important;
545-
}
546-
547-
.ps-0 {
548-
padding-left: 0 !important;
549-
padding-right: 0 !important;
550-
}
551-
552-
.ps-2 {
553-
padding-left: 0 !important;
554-
padding-right: 0.5rem !important;
555-
}
556-
557-
.ps-3 {
558-
padding-left: 0 !important;
559-
padding-right: 1rem !important;
560-
}
561-
562-
.ps-4 {
563-
padding-left: 0 !important;
564-
padding-right: 1.5rem !important;
565-
}
566-
567-
.ms-auto {
568-
margin-left: 0 !important;
569-
margin-right: auto !important;
570-
}
571-
572-
.px-md-3 {
573-
@include bp.md {
574-
padding-right: 1rem !important;
575-
padding-left: 1rem !important;
576-
}
577-
}
578-
579477
/* Text alignment in RTL */
580478
.text-start {
581479
text-align: right !important;

0 commit comments

Comments
 (0)