fix: move dir attribute to :root (#805)

This commit is contained in:
Ludovic Fernandez
2025-08-30 10:07:09 +02:00
committed by GitHub
parent 82e25c0b0d
commit 3abcde4f8e
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ function computeMenuTranslation(switcher, optionsElement) {
const isOnTop = switcher.dataset.location === 'top';
const isOnBottom = switcher.dataset.location === 'bottom';
const isOnBottomRight = switcher.dataset.location === 'bottom-right';
const isRTL = document.body.dir === 'rtl'
const isRTL = document.documentElement.dir === 'rtl'
// Stuck on the left side of the switcher.
let x = switcherRect.left;

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
<html lang="{{ .Site.Language.Lang }}" dir="{{ .Site.Language.LanguageDirection | default `ltr` }}">
{{- partial "head.html" . -}}
<body dir="{{ .Site.Language.LanguageDirection | default `ltr` }}">
<body>
{{- partial "banner.html" . -}}
{{- partial "navbar.html" . -}}
{{- block "main" . }}{{ end -}}