From dee2c9e3a66d149e196179841f6dae5b8c0627b8 Mon Sep 17 00:00:00 2001 From: dev Date: Tue, 4 Aug 2026 03:23:38 +0200 Subject: [PATCH] fix(direction): dos reglas :dir(rtl) volteaban lo que ya estaba volteado MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Salieron documentando el eje, no auditandolo, que es lo que las hace utiles: son una forma que yo no habia visto y que el guard no ve. EL DOBLE VOLTEO — una regla `:dir(rtl)` cuyo cuerpo solo reasigna propiedades LOGICAS. Cuando esa regla matchea, la propiedad YA se ha espejado, asi que moverla de `inline-start` a `inline-end` la devuelve al punto de partida; y como las declaraciones hermanas se quedan quietas, aterriza en el borde OPUESTO al de la cosa a la que pertenece. - `feed.css` — el hilo anidado sangraba por un borde y dibujaba su rail en el otro. El rail marca el borde DESDE el que se sangra, asi que viaja en el mismo lado logico que el padding y se espeja con el. - `tree-view.css` — la guia de indentacion quedaba aparcada al otro lado del subarbol que marca. El arreglo es RETIRAR las dos reglas: las propiedades logicas ya hacian lo correcto solas. En su lugar queda un comentario, porque el proximo que lea el recipe va a tener la misma tentacion. Medido en Chrome: `feed` da padding-left:20px + border-left:2px en LTR y padding-right:20px + border-right:2px en RTL — los dos en el mismo borde. La guia de `tree-view` resuelve a left:16px en LTR y right:16px en RTL. ⚠️ NO pude ver los pixeles: el panel del navegador no estaba visible. COMO SE COLARON: la migracion de §6.3 (`[dir='rtl']` → `:dir(rtl)`, `ec533845d`) cambio el SELECTOR de las 12 reglas sin preguntarse si el CUERPO era correcto. Una migracion mecanica hereda los defectos que traduce. RTL-1 tampoco las ve — busca un desplazamiento FISICO contra un ancla logica, y aqui todo es logico. Extender el guard a esta forma queda pendiente. Ademas: el JSDoc de `dir` en waveform prometia «@default from Soma config». Es falso — waveform es el caso delegante, no llama a `activeDir`, y sin prop no hay atributo ni lectura de prefs: hereda. `eidos-lint` feed/tree-view: invalid 0. Ningun test afirma sobre las dos reglas. `rtl:check` sigue en 1 error, el de `palabras`, preexistente y excluido. Co-Authored-By: Claude Opus 5 --- src/uix/eidos/components/feed/feed.css | 10 +++++----- src/uix/eidos/components/tree-view/tree-view.css | 13 ++++--------- src/uix/soma/components/waveform/types.ts | 4 +++- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/uix/eidos/components/feed/feed.css b/src/uix/eidos/components/feed/feed.css index 23f6d4e2e..d26d101ef 100644 --- a/src/uix/eidos/components/feed/feed.css +++ b/src/uix/eidos/components/feed/feed.css @@ -139,14 +139,14 @@ gap: var(--_feed-gap); margin-block-start: var(--space-2); padding-inline-start: var(--_feed-thread-indent); + /* The rail marks the edge the thread is indented FROM, so it rides the same + logical side as the padding and mirrors with it. A `:dir(rtl)` rule that + repainted it at `inline-end` used to live here: that is a DOUBLE flip — + the logical property had already mirrored — and it left the indent on one + edge and the rail on the other. RTL-1 cannot see this shape. */ border-inline-start: var(--border-width-medium) solid var(--_feed-palette-element); } -[data-feed-root]:dir(rtl) [data-feed-thread] { - border-inline-start: 0; - border-inline-end: var(--border-width-medium) solid var(--_feed-palette-element); -} - /* ── Sentinel ─ * * The sentinel is decorative (`aria-hidden`) — soma drives the diff --git a/src/uix/eidos/components/tree-view/tree-view.css b/src/uix/eidos/components/tree-view/tree-view.css index 0085d5311..54b379f24 100644 --- a/src/uix/eidos/components/tree-view/tree-view.css +++ b/src/uix/eidos/components/tree-view/tree-view.css @@ -198,6 +198,10 @@ inset-block: 0; inline-size: 1px; background: var(--_tree-view-guide); + /* Logical inset, so the guide mirrors with the rows it marks. A `:dir(rtl)` + rule that moved it to `inset-inline-end` used to live here: that is a + DOUBLE flip — the logical inset had already mirrored — and it parked the + guide on the far side of its own subtree. RTL-1 cannot see this shape. */ inset-inline-start: calc( var(--tree-depth, 0) * var(--_tree-view-indent) + var(--_tree-view-indent) / 2 + @@ -206,15 +210,6 @@ pointer-events: none; } -[data-tree-view-root][data-indent-guides]:dir(rtl) [data-tree-view-branch]::before { - inset-inline-start: auto; - inset-inline-end: calc( - var(--tree-depth, 0) * var(--_tree-view-indent) + - var(--_tree-view-indent) / 2 + - var(--_tree-view-row-padding-inline) - ); -} - /* The soma `` part itself is now decorative-only — hide it so consumers can keep it in markup (soma assertion) without visual duplication of the pseudo-element guide above. */ diff --git a/src/uix/soma/components/waveform/types.ts b/src/uix/soma/components/waveform/types.ts index 6595aaad9..ea0b08432 100644 --- a/src/uix/soma/components/waveform/types.ts +++ b/src/uix/soma/components/waveform/types.ts @@ -35,7 +35,9 @@ export type WaveformProps = WithChild<{ disabled?: boolean; /** * Text direction, forwarded to the embedded Slider so its value anchoring - * agrees with the recipe's mirrored painting. @default from Soma config + * agrees with the recipe's mirrored painting. Resolved by NOBODY here: the + * raw prop rides the root AND reaches the Slider, which runs the chain + * itself. @default inherited — with no prop there is no attribute. */ dir?: Direction; /** Secondary track (buffered / preloaded), forwarded to the Slider (G-2). */