|
2497 | 2497 | centered hero (they collapse to 0 when the viewport is narrower than the |
2498 | 2498 | hero cap and the two widths coincide). */ |
2499 | 2499 | .home-hero__plugin-presets-wrap { |
| 2500 | + /* One geometry contract for both the loading shell and settled cards. |
| 2501 | + The fixed card height is the natural rendered height of the preview, |
| 2502 | + gap, caption line, padding, and border rounded to a whole pixel. */ |
| 2503 | + --home-plugin-preset-width: 248px; |
| 2504 | + --home-plugin-preset-preview-h: 150px; |
| 2505 | + --home-plugin-preset-card-h: 194px; |
2500 | 2506 | width: 100cqw; |
2501 | 2507 | max-width: 100cqw; |
2502 | 2508 | margin-inline: calc((100% - 100cqw) / 2); |
|
2506 | 2512 | scrolling presets row (not the title above it). */ |
2507 | 2513 | .home-hero__rail-scroller { |
2508 | 2514 | position: relative; |
2509 | | - min-height: 194px; |
| 2515 | + /* Both preset rows use 1px top + 8px bottom padding. Reserving that |
| 2516 | + together with the shared card height prevents the centered Home layout |
| 2517 | + from moving when loading content is replaced. */ |
| 2518 | + min-height: calc(var(--home-plugin-preset-card-h) + 9px); |
2510 | 2519 | } |
2511 | 2520 |
|
2512 | 2521 | .home-hero__plugin-presets { |
|
2523 | 2532 | } |
2524 | 2533 | .home-hero__plugin-presets::-webkit-scrollbar { display: none; } |
2525 | 2534 |
|
| 2535 | +/* Keep the Examples rail's final geometry reserved while the Workspace-scoped |
| 2536 | + plugin catalogue resolves. These placeholders are deliberately static: the |
| 2537 | + real cards already own their entrance animation, and animating the loading |
| 2538 | + shell would recreate the startup twitch this state is meant to prevent. */ |
| 2539 | +.home-hero__plugin-presets-loading { |
| 2540 | + display: flex; |
| 2541 | + align-items: stretch; |
| 2542 | + gap: 10px; |
| 2543 | + overflow: hidden; |
| 2544 | + padding: 1px 2px 8px; |
| 2545 | +} |
| 2546 | +.home-hero__plugin-preset-loading { |
| 2547 | + flex: 0 0 var(--home-plugin-preset-width); |
| 2548 | + min-width: 0; |
| 2549 | + height: var(--home-plugin-preset-card-h); |
| 2550 | + min-height: var(--home-plugin-preset-card-h); |
| 2551 | + display: grid; |
| 2552 | + grid-template-rows: var(--home-plugin-preset-preview-h) minmax(0, auto); |
| 2553 | + gap: 8px; |
| 2554 | + overflow: hidden; |
| 2555 | + border: 1px solid var(--border); |
| 2556 | + border-radius: var(--radius-lg); |
| 2557 | + background: var(--bg-panel); |
| 2558 | + box-shadow: var(--shadow-xs); |
| 2559 | +} |
| 2560 | +.home-hero__plugin-preset-loading-preview { |
| 2561 | + display: block; |
| 2562 | + background: var(--bg-subtle); |
| 2563 | + border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent); |
| 2564 | +} |
| 2565 | +.home-hero__plugin-preset-loading-title { |
| 2566 | + display: block; |
| 2567 | + width: 46%; |
| 2568 | + height: 10px; |
| 2569 | + margin: 1px 10px 0; |
| 2570 | + border-radius: var(--radius-pill); |
| 2571 | + background: color-mix(in srgb, var(--text-faint) 18%, var(--bg-subtle)); |
| 2572 | +} |
| 2573 | + |
2526 | 2574 | /* Each preset is wrapped in a positioning cell so the "Open as project" |
2527 | 2575 | overlay can sit over the thumbnail without nesting a button inside the |
2528 | 2576 | card button. The flex sizing lives on the cell; the card button fills it. */ |
2529 | 2577 | .home-hero__plugin-preset-cell { |
2530 | 2578 | position: relative; |
2531 | | - flex: 0 0 248px; |
| 2579 | + flex: 0 0 var(--home-plugin-preset-width); |
2532 | 2580 | min-width: 0; |
2533 | 2581 | display: flex; |
2534 | 2582 | /* One source for the preview row's height: the preview box below pins |
2535 | 2583 | itself to it. */ |
2536 | | - --preset-preview-h: 150px; |
| 2584 | + --preset-preview-h: var(--home-plugin-preset-preview-h); |
2537 | 2585 | } |
2538 | 2586 |
|
2539 | 2587 | .home-hero__plugin-preset { |
2540 | 2588 | appearance: none; |
2541 | 2589 | position: relative; |
2542 | 2590 | width: 100%; |
2543 | | - height: auto; |
2544 | | - /* Low enough that the caption row hugs its text (150 preview + 8 gap + |
2545 | | - one 16px line + 6px pad ≈ 180); a taller min just reads as dead space |
2546 | | - under the title. */ |
2547 | | - min-height: 172px; |
| 2591 | + height: var(--home-plugin-preset-card-h); |
| 2592 | + min-height: var(--home-plugin-preset-card-h); |
2548 | 2593 | min-width: 0; |
2549 | 2594 | display: grid; |
2550 | | - grid-template-rows: 150px minmax(0, auto); |
| 2595 | + grid-template-rows: var(--home-plugin-preset-preview-h) minmax(0, auto); |
2551 | 2596 | gap: 8px; |
2552 | 2597 | padding: 0; |
2553 | 2598 | border: 1px solid var(--border); |
|
2883 | 2928 | } |
2884 | 2929 |
|
2885 | 2930 | @media (max-width: 900px) { |
| 2931 | + .home-hero__plugin-presets-wrap { |
| 2932 | + --home-plugin-preset-width: 224px; |
| 2933 | + --home-plugin-preset-preview-h: 136px; |
| 2934 | + --home-plugin-preset-card-h: 180px; |
| 2935 | + } |
2886 | 2936 | .home-hero__title { |
2887 | 2937 | font-size: 38.4px; |
2888 | 2938 | } |
2889 | 2939 | .home-hero__prompt-examples-grid { |
2890 | 2940 | grid-template-columns: repeat(2, minmax(0, 1fr)); |
2891 | 2941 | } |
2892 | | - .home-hero__plugin-preset-cell { |
2893 | | - flex-basis: 224px; |
2894 | | - } |
2895 | | - .home-hero__plugin-preset { |
2896 | | - min-height: 170px; |
2897 | | - grid-template-rows: 136px minmax(0, auto); |
2898 | | - } |
2899 | | - .home-hero__plugin-preset-preview { |
2900 | | - min-height: 136px; |
2901 | | - } |
2902 | 2942 | .home-hero__plugin-preset-preview .plugins-home__html-iframe { |
2903 | 2943 | transform: scale(0.146); |
2904 | 2944 | } |
|
2934 | 2974 | } |
2935 | 2975 |
|
2936 | 2976 | @media (max-width: 560px) { |
| 2977 | + .home-hero__plugin-presets-wrap { |
| 2978 | + --home-plugin-preset-width: 208px; |
| 2979 | + --home-plugin-preset-preview-h: 126px; |
| 2980 | + --home-plugin-preset-card-h: 170px; |
| 2981 | + } |
2937 | 2982 | .home-hero__type-tabs { |
2938 | 2983 | justify-content: flex-start; |
2939 | 2984 | padding: 0; |
2940 | 2985 | } |
2941 | 2986 | .home-hero__prompt-examples-grid { |
2942 | 2987 | grid-template-columns: 1fr; |
2943 | 2988 | } |
2944 | | - .home-hero__plugin-preset-cell { |
2945 | | - flex-basis: 208px; |
2946 | | - } |
2947 | | - .home-hero__plugin-preset { |
2948 | | - min-height: 160px; |
2949 | | - grid-template-rows: 126px minmax(0, auto); |
2950 | | - } |
2951 | | - .home-hero__plugin-preset-preview { |
2952 | | - min-height: 126px; |
2953 | | - } |
2954 | 2989 | .home-hero__plugin-preset-preview .plugins-home__html-iframe { |
2955 | 2990 | transform: scale(0.134); |
2956 | 2991 | } |
|
0 commit comments