From 0fa089060f8cb07b70f3c378b5873acb3f3a5fd8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 6 Oct 2026 09:35:18 +0900 Subject: [PATCH 1/2] Update Bootstrap to 5.3.8 and Popper to 2.11.8 Bootstrap 5.2 dropped `unicode-bidi: bidi-override` from `pre` and `code`, which laid out RTL text in lesson code examples in logical order. Under 5.3 the language menu toggle, a plain `.btn` that is also a `.nav-link`, took the navbar's font and lost its border and focus ring states, so it now sets them itself. Co-Authored-By: Claude Opus 5.5 --- source/layouts/layout.html.erb | 12 ++++++------ source/stylesheets/application.css.scss | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source/layouts/layout.html.erb b/source/layouts/layout.html.erb index 3e71195..49d0a70 100644 --- a/source/layouts/layout.html.erb +++ b/source/layouts/layout.html.erb @@ -21,8 +21,8 @@ /> <%= stylesheet_link_tag "vendor/codemirror" %> @@ -32,13 +32,13 @@ <%# Scripts %> <%= javascript_include_tag "vendor/codemirror-compressed-4.8" %> diff --git a/source/stylesheets/application.css.scss b/source/stylesheets/application.css.scss index 0a88d6b..7efaa0b 100644 --- a/source/stylesheets/application.css.scss +++ b/source/stylesheets/application.css.scss @@ -68,6 +68,12 @@ body { } .language-menu-toggle { + // Bootstrap 5.3 gives a plain .btn.nav-link the navbar's font and no usable border or focus ring states + --bs-btn-hover-border-color: var(--nav-border-color); + --bs-btn-active-border-color: var(--nav-border-color); + --bs-btn-focus-box-shadow: 0 0 0 var(--bs-focus-ring-width) var(--bs-focus-ring-color); + font-size: 1rem; + font-weight: normal; background: transparent; border: 1px solid var(--nav-border-color); From 940bba07538cd18aaa4725e7f5a3783fd689b279 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 6 Oct 2026 09:35:45 +0900 Subject: [PATCH 2/2] Drop the bidi reset on CodeMirror lines Bootstrap 5.3 no longer sets `unicode-bidi` on `pre`, so the reset added in fa33ee6 has nothing left to undo. Co-Authored-By: Claude Opus 5.5 --- source/stylesheets/application.css.scss | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/stylesheets/application.css.scss b/source/stylesheets/application.css.scss index 7efaa0b..761617e 100644 --- a/source/stylesheets/application.css.scss +++ b/source/stylesheets/application.css.scss @@ -258,11 +258,6 @@ pre { background: white; padding: .25em; border-radius: .5rem; - - // Undo Bootstrap's bidi-override on pre, which lays out RTL text in logical order - pre { - unicode-bidi: normal; - } } }