Devuelve el ensanchamiento lateral a las tarjetas del Menú Principal
La rejilla del commit anterior igualaba los tamaños pero mataba el gesto: en una celda de rejilla el carril está fijo, así que la tarjeta bajo el cursor no podía crecer y se conformaba con levantarse. El artboard nuevo consigue las dos cosas a la vez volviendo a dos filas flex y metiendo un espaciador de flex 0.5 a cada extremo de la de abajo: 0.5 + 1 + 1 + 0.5 son las mismas tres partes que reparte la fila de arriba, así que las tarjetas vuelven a medir lo mismo y el par queda centrado, y como todo sigue siendo flex el hover recupera su flex-grow: 1.18 y empuja. Medido en Chrome: al pasar por Panel General crece de 472 a 523 px, Venta y QR se estrechan a 447 y QR se corre 25 px a la derecha; en la fila de abajo los espaciadores también ceden ancho (226 → 214) en vez de dejar el gesto a medias contra un borde muerto. Los espaciadores son <span> vacíos: sin caja, sin texto, sin parada de tabulación. Solo sostienen espacio y lo devuelven cuando un vecino crece. Las dos filas no quedan iguales al píxel, y es del propio markup del diseño: la de abajo lleva un hueco de gap más y dos tarjetas en vez de tres aportando padding y borde, así que reparte 6 px menos y las suyas salen 7 px más anchas — un 1.5%, imperceptible. Se copia como está en vez de corregir un ideal que el diseño no pide. Nada más cambia: control maestro, firma, foco y colores intactos. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8120c22c7f
commit
4c767b3e80
2 files changed
+44
-44
No files matched your search
@@ -23,10 +23,12 @@
|
||||
// of small buttons.
|
||||
// · Tableros went from grey to gold.
|
||||
// · The catch-all tile row is GONE. See the note over .beyond_launcher_master.
|
||||
// · The five doors are all ONE size (23-aug-2026 artboard). Two flex rows
|
||||
// gave the bottom pair half the width each against the top trio's third;
|
||||
// one grid of six columns, two per block, makes them equal and centres the
|
||||
// bottom row. Hover lifts the block instead of widening it.
|
||||
// · The five doors are all ONE size (23-aug-2026 artboard). The bottom row
|
||||
// used to give its two blocks half the width each against the top trio's
|
||||
// third; a half-width spacer at each end of it splits the row into the same
|
||||
// three parts, so every door matches and the pair sits centred. Done with
|
||||
// spacers rather than a grid so hover keeps SHOVING: the block under the
|
||||
// cursor widens and its neighbours give way, which no grid track can do.
|
||||
//
|
||||
// PALETTE — the rule in scss/beyond_variables.scss is that a colour graduates
|
||||
// to a token when a SECOND screen needs it. Nothing graduated in v4 and one
|
||||
@@ -225,41 +227,34 @@ $beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// The grid
|
||||
// The two rows
|
||||
//
|
||||
// Six columns, every block spanning two: that is the whole trick behind
|
||||
// "all the same size". v4 laid the doors out as two flex ROWS, so the two
|
||||
// blocks of the bottom row were half the width each while the three of the
|
||||
// top row were a third — same height, different width. One grid of six
|
||||
// fixes it: three per row, each a third wide, and the bottom row centred by
|
||||
// hand into columns 2-3 and 4-5.
|
||||
//
|
||||
// `grid-auto-rows: 1fr` is what keeps the rows equal in height, and the
|
||||
// grid itself takes `flex: 1` so the two rows split whatever the header,
|
||||
// the master row and the signature leave behind.
|
||||
// Both grow, so the blocks split whatever height the header, the master row
|
||||
// and the signature leave behind. Flex and not a grid on purpose: a flex
|
||||
// item can widen past its share, and that is the whole point of the hover
|
||||
// below — the block under the cursor grows and shoves its neighbours aside.
|
||||
// A grid track cannot do that.
|
||||
// -------------------------------------------------------------------------
|
||||
.beyond_launcher_grid {
|
||||
.beyond_launcher_band {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
grid-auto-rows: 1fr;
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
padding: 8px 6px 8px;
|
||||
}
|
||||
|
||||
// ENGINEERING — the hand-placed bottom row is the design's NOMINAL case:
|
||||
// the five doors, all present. It only applies when all five actually
|
||||
// render, because a block whose app is hidden for this role does not
|
||||
// render at all, and an explicit `grid-column: 2` on a four-block screen
|
||||
// pins Inventario off-centre with a hole beside it. Short of the five, the
|
||||
// blocks auto-flow three per row in reading order, which is the sane
|
||||
// degradation. Roles differ here for real: Tableros is visible to every
|
||||
// internal user, Venta and Inventario ride on POS/stock groups, and Panel
|
||||
// General and QR on the branch administrator's.
|
||||
.beyond_launcher_grid:has(.beyond_block_venta):has(.beyond_block_panel):has(.beyond_block_qr):has(.beyond_block_inventario):has(.beyond_block_tableros) {
|
||||
.beyond_block_inventario { grid-column: 2 / span 2; }
|
||||
.beyond_block_tableros { grid-column: 4 / span 2; }
|
||||
.beyond_launcher_row1 { padding: 8px 6px 0; }
|
||||
.beyond_launcher_row2 { padding: 6px 6px 8px; }
|
||||
|
||||
// The bottom row's two blocks would otherwise be half the row each against
|
||||
// the third the three above get — same height, wider box. A half-width
|
||||
// spacer at each end fixes both things at once: 0.5 + 1 + 1 + 0.5 splits
|
||||
// into the same three parts as row 1, so every door is the same size, and
|
||||
// the pair ends up centred. Empty, inert, invisible: no box, no text, no
|
||||
// tab stop; it only holds space, and it yields it back when a neighbour
|
||||
// grows on hover.
|
||||
.beyond_launcher_spacer {
|
||||
flex: 0.5;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
// Reset: DropdownItem renders an <a.dropdown-item>, so Bootstrap's block
|
||||
@@ -281,7 +276,7 @@ $beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35);
|
||||
// The blocks
|
||||
// -------------------------------------------------------------------------
|
||||
.beyond_block {
|
||||
grid-column: span 2;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
justify-content: center;
|
||||
@@ -290,15 +285,14 @@ $beyond-launcher-vidrio-bajo: rgba(255, 255, 255, 0.35);
|
||||
border: 1.5px solid $beyond-launcher-vidrio-borde;
|
||||
border-radius: 28px;
|
||||
backdrop-filter: blur(16px);
|
||||
transition: transform 220ms ease, background 180ms ease;
|
||||
transition: flex-grow 220ms ease, background 180ms ease;
|
||||
|
||||
// The block rises instead of growing. v4 widened it with flex-grow,
|
||||
// which a grid cell cannot do: its track is fixed at two columns, and
|
||||
// that is the point — the doors stay the same size. The design answers
|
||||
// with a lift.
|
||||
// The block under the cursor takes more of the row and pushes its
|
||||
// neighbours aside. Transitioning flex-grow is what animates the shove:
|
||||
// every sibling gives up width at the same time, spacers included.
|
||||
&:hover,
|
||||
&:active {
|
||||
transform: translateY(-6px);
|
||||
flex-grow: 1.18;
|
||||
}
|
||||
|
||||
svg {
|
||||
|
||||
@@ -68,11 +68,9 @@
|
||||
<span class="beyond_launcher_rule"/>
|
||||
</div>
|
||||
|
||||
<!-- One grid, six columns, every block spanning two of them: that
|
||||
is what makes the five doors the same size. Row 2 is centred
|
||||
by hand in the stylesheet. A block whose app is hidden for
|
||||
this role simply does not render. -->
|
||||
<div class="beyond_launcher_band beyond_launcher_grid">
|
||||
<!-- Row 1. A block whose app is hidden for this role simply does
|
||||
not render and the remaining ones spread out on their own. -->
|
||||
<div class="beyond_launcher_band beyond_launcher_row1">
|
||||
<t t-foreach="apps" t-as="app" t-key="app.id">
|
||||
<DropdownItem
|
||||
t-if="app.xmlid === 'point_of_sale.menu_point_root'"
|
||||
@@ -127,6 +125,13 @@
|
||||
<span class="beyond_block_name">QR</span>
|
||||
</DropdownItem>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<!-- Row 2. The two half-width spacers are what centre it and what
|
||||
make its blocks the same size as the three above: 0.5 + 1 + 1
|
||||
+ 0.5 is the same three parts row 1 splits. -->
|
||||
<div class="beyond_launcher_band beyond_launcher_row2">
|
||||
<span class="beyond_launcher_spacer"/>
|
||||
<t t-foreach="apps" t-as="app" t-key="app.id">
|
||||
<DropdownItem
|
||||
t-if="app.xmlid === 'stock.menu_stock_root'"
|
||||
@@ -157,6 +162,7 @@
|
||||
<span class="beyond_block_name">Tableros</span>
|
||||
</DropdownItem>
|
||||
</t>
|
||||
<span class="beyond_launcher_spacer"/>
|
||||
</div>
|
||||
|
||||
<!-- Master row. Two curated buttons, both behind base.group_system,
|
||||
|
||||
Reference in new issue
Block a user