fix: campos condicionales ocultos no dejan espacio en blanco
- JS evaluar(): añade margin:0; padding:0 al ocultar elementos con maxHeight:0 para que .campo-edit no deje margen residual - PHP render: baked-in separator oculto incluye margin:0;padding:0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c9ea76f782
commit
70077d7fd4
@@ -978,7 +978,7 @@ function _addExamWizardHtml(string $cid): string {
|
||||
}
|
||||
if (($_saltarSeccion && !$modoEditar) || $_mpSkipSec) continue; ?>
|
||||
<div class="esquema-sep<?= $compact ? ' campo-full' : '' ?>" data-campo-id="<?= esc2($campo['id'] ?? '') ?>"
|
||||
<?= ($_saltarSeccion && $modoEditar) ? 'style="max-height:0;opacity:0;overflow:hidden;pointer-events:none"' : '' ?>><?= esc2($campo['label'] ?? '') ?></div>
|
||||
<?= ($_saltarSeccion && $modoEditar) ? 'style="max-height:0;opacity:0;overflow:hidden;pointer-events:none;margin:0;padding:0"' : '' ?>><?= esc2($campo['label'] ?? '') ?></div>
|
||||
<?php continue; endif;
|
||||
if (($_saltarSeccion && !$modoEditar) || $_mpSkipSec) continue;
|
||||
|
||||
@@ -2895,11 +2895,13 @@ const topaz = (() => {
|
||||
ids.forEach(function(id) {
|
||||
var el = document.querySelector('[data-campo-id="' + id + '"]');
|
||||
if (!el) return;
|
||||
el.style.transition = 'opacity .2s, max-height .3s';
|
||||
el.style.maxHeight = activo ? '2000px' : '0';
|
||||
el.style.opacity = activo ? '1' : '0';
|
||||
el.style.overflow = activo ? '' : 'hidden';
|
||||
el.style.transition = 'opacity .2s, max-height .3s';
|
||||
el.style.maxHeight = activo ? '2000px' : '0';
|
||||
el.style.opacity = activo ? '1' : '0';
|
||||
el.style.overflow = activo ? '' : 'hidden';
|
||||
el.style.pointerEvents = activo ? '' : 'none';
|
||||
el.style.margin = activo ? '' : '0';
|
||||
el.style.padding = activo ? '' : '0';
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user