fix : densité L/M/S — injection <style> dynamique dans <head>

Remplace body[data-density] + CSS externe par un élément <style id="density-fouc">
injecté dynamiquement dans <head>, insensible aux problèmes de spécificité et de cache CSS.
Remplace aussi closest() par une boucle parentNode et dataset par getAttribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 20:49:08 +02:00
parent 5e88d44129
commit 58a110d5b9
3 changed files with 25 additions and 15 deletions
+1 -3
View File
@@ -1267,9 +1267,7 @@ footer.mt-5 { margin-top: 0 !important; }
}
/* ─── Densité d'affichage L / M / S ──────── */
main { transition: max-width .22s ease, padding-left .22s ease, padding-right .22s ease; }
body[data-density="m"] main { max-width: 980px !important; margin-left: auto !important; margin-right: auto !important; }
body[data-density="s"] main { max-width: 660px !important; margin-left: auto !important; margin-right: auto !important; }
main { transition: max-width .22s ease; }
/* Widget fixe haut-droite */
.density-widget {