diff --git a/mkdocs/assets/stylesheets/cloudscape-docs.css b/mkdocs/assets/stylesheets/cloudscape-docs.css index 3f4105ad1a..1513f3f434 100644 --- a/mkdocs/assets/stylesheets/cloudscape-docs.css +++ b/mkdocs/assets/stylesheets/cloudscape-docs.css @@ -141,6 +141,13 @@ } } +/* Both button groups share the header center; clear landing.css's legacy top padding. */ +.md-header__inner .cs-products-menu, +.md-header__inner .md-header__buttons { + align-self: center; + padding-block: 0; +} + .md-header__buttons .md-button { margin-top: 0; margin-bottom: 0; @@ -171,6 +178,7 @@ /* Header action buttons → /old pills. Prefixed with the primary color attr to out-specify landing.css's button rules. */ +.cs-products-menu__trigger, [data-md-color-primary=white] .md-header__buttons .md-button--primary, [data-md-color-primary=white] .md-header__buttons .md-button--primary:hover { box-sizing: border-box; @@ -239,6 +247,9 @@ /* Products menu matches website/src/styles.css. */ .cs-products-menu { + --products-arrow-gap: 10px; + --cs-hover: rgba(22, 25, 31, 0.03); + --products-focus-color: #006ce0; position: relative; display: inline-flex; align-items: center; @@ -246,28 +257,54 @@ font-size: 16px; line-height: 1.15; } +[data-md-color-scheme="slate"] .cs-products-menu { + --cs-hover: rgba(242, 243, 243, 0.05); + --products-focus-color: #42b4ff; +} .cs-products-menu__trigger { - display: inline-flex; - align-items: center; - gap: 4px; - min-height: 42px; - padding: 10px 0; - border: 0; - border-radius: 21px; + position: relative; + gap: var(--products-arrow-gap); + padding-inline: 18px var(--products-arrow-gap); + border: 1px solid var(--cs-border); background: transparent; color: var(--cs-text); - font: inherit; - font-weight: 700; + font-family: inherit; + letter-spacing: 0.005em; cursor: pointer; } -.cs-products-menu__trigger:hover { - text-decoration: underline; - text-underline-offset: 0.2em; +.cs-products-menu__trigger:hover, +.cs-products-menu__trigger:active { + background: var(--cs-hover); +} +.cs-products-menu__trigger:focus { + outline: none; } +/* Match the secondary Cloudscape button's keyboard-focus ring. */ .cs-products-menu__trigger:focus-visible { - background: var(--cs-panel); + outline: 2px dotted transparent; + outline-offset: 3px; +} +.cs-products-menu__trigger:focus-visible::before { + content: ''; + position: absolute; + inset-inline-start: -4px; + inset-block-start: -4px; + inline-size: calc(100% + 8px); + block-size: calc(100% + 8px); + border-radius: 4px; + box-shadow: 0 0 0 2px var(--products-focus-color); + pointer-events: none; +} +.cs-products-menu__icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 12px; + height: 12px; + flex: 0 0 auto; } .cs-products-menu__caret { + display: block; width: 12px; height: 12px; transition: transform 0.15s ease; @@ -276,6 +313,7 @@ transform: rotate(180deg); } .cs-products-menu__popup { + box-sizing: border-box; display: none; position: absolute; top: calc(100% + 6px); @@ -283,11 +321,16 @@ z-index: 1000; width: 360px; background: var(--cs-panel); + border: 1px solid var(--cs-border); border-radius: 8px; + overflow: hidden; } .cs-products-menu--open .cs-products-menu__popup { display: block; } +.cs-products-menu__popup .gs-rail { + border-radius: 7px; +} .cs-products-menu__popup .gs-opt + .gs-rail__group { margin-top: 0; } @@ -334,6 +377,10 @@ background: var(--cs-bg); box-shadow: inset 0 0 0 0.5px var(--cs-text); } +.cs-products-menu__popup .gs-opt:hover, +.cs-products-menu__popup .gs-opt:focus-visible { + box-shadow: none; +} .gs-opt--feat { padding: 13px 14px; gap: 14px; diff --git a/mkdocs/overrides/header-2.html b/mkdocs/overrides/header-2.html index 5b3183284a..341e28f10c 100644 --- a/mkdocs/overrides/header-2.html +++ b/mkdocs/overrides/header-2.html @@ -76,14 +76,16 @@ {# Keep menu descriptions in sync with SiteNavigation.tsx. GetStartedSection.tsx uses a longer dstack description. #}
diff --git a/website/src/styles.css b/website/src/styles.css index 282b26eb3c..f82cf21f18 100644 --- a/website/src/styles.css +++ b/website/src/styles.css @@ -163,20 +163,25 @@ p { transform: translateX(3px); } -/* "Get started" CTA arrow — the banner's thin arrow + hover slide, reused on the primary CTAs - (top-nav and hero). Cloudscape's Button takes no className, so a wrapper span carries the - hover: hovering the button hovers the wrapper, which slides the arrow. */ +/* Compact buttons give the arrow a little extra room at the button edge. + Hero buttons supply their own symmetric padding around the whole label. */ .cta-with-arrow { + --cta-padding-end: 10px; display: inline-flex; + flex: 0 0 auto; } -.cta-arrow { +.cta-with-arrow__label { display: inline-flex; - vertical-align: middle; - margin-inline-start: 6px; - transition: transform 0.2s ease; + align-items: center; + gap: 6px; + white-space: nowrap; + vertical-align: top; } -.cta-with-arrow:hover .cta-arrow { - transform: translateX(3px); +.cta-with-arrow__icon { + display: block; + flex: 0 0 12px; + width: 12px; + height: 12px; } /* Banner + nav stick to the top together. Sticking the wrapper (rather than each child) @@ -227,8 +232,7 @@ p { padding: 14px 24px; } -.site-logo, -.site-menu-button { +.site-logo { border: 0; background: transparent; color: var(--cs-text); @@ -270,7 +274,6 @@ p { display: none; } -.site-menu-button, .site-menu-link { display: inline-flex; align-items: center; @@ -286,47 +289,46 @@ p { text-decoration: none; } -.site-menu-button:hover, .site-menu-link:hover { text-decoration: underline; text-underline-offset: 0.2em; } -/* Keyboard focus only on the top-menu buttons. These are our own elements (not Cloudscape +/* Keyboard focus only on the top-menu links. These are our own elements (not Cloudscape components), so use plain values rather than Cloudscape's internal token variables. */ -.site-menu-button:focus-visible, .site-menu-link:focus-visible { background: var(--cs-panel); color: var(--cs-text); } -.site-menu-button.active { - border: 2px solid #879596; -} - -/* "Products" top-nav hover menu. The trigger (.site-hover-menu__trigger) inherits the plain - text-link look from .site-menu-button; the popup opens on hover and is anchored to the - trigger. Continuity across the trigger→popup gap is handled by a close delay in JS - (hover-intent), so no visual bridge is needed here. */ -.site-hover-menu { +/* The Products secondary button anchors the click-to-open popup. */ +.site-products-dropdown { + --products-arrow-gap: 10px; position: relative; display: inline-flex; align-items: center; } +/* The text-to-caret gap and trailing button padding use the same value. */ +.site-products-dropdown__label { + display: inline-flex; + align-items: center; + gap: var(--products-arrow-gap); + vertical-align: top; +} /* Dropdown caret on the Products trigger — rotates 180° while the menu is open. */ -.site-hover-menu__caret { +.site-products-dropdown__caret { + display: block; width: 12px; height: 12px; opacity: 1; /* full text colour — the caret reads as black like the menu label */ transition: transform 0.15s ease; } -.site-hover-menu__trigger[aria-expanded='true'] .site-hover-menu__caret { +.site-products-dropdown[data-open='true'] .site-products-dropdown__caret { transform: rotate(180deg); } -/* "Products" popup: renders the exact same grouped switcher rail as the Get-started section - (.gs-rail — see that block below for the visuals). This wrapper only anchors and sizes it. */ +/* The Products popup frames the shared grouped rail with one outer border. */ .site-products-menu { position: absolute; top: calc(100% + 6px); @@ -336,7 +338,12 @@ p { /* A floating popup can't show a see-through hole between the groups (arbitrary page content sits behind it) — back the rail with the unselected-row color so the gap reads as ground. */ background: var(--cs-panel); + border: 1px solid var(--cs-border); border-radius: 8px; + overflow: hidden; +} +.site-products-menu .gs-rail { + border-radius: 7px; } /* And no hole at all in the popup: the groups sit flush, like one continuous menu. */ .site-products-menu .gs-opt + .gs-rail__group { @@ -386,7 +393,7 @@ p { font-weight: 600; } -/* Hero CTAs sit side by side, each sized to its own label (not forced to equal width). */ +/* Paired actions share equal columns; single actions keep their natural width. */ .home-hero__actions { margin-top: 28px; display: inline-flex; @@ -394,6 +401,14 @@ p { gap: 8px; } +.cta-pair { + display: inline-grid; + grid-auto-flow: column; + grid-auto-columns: minmax(0, 1fr); + gap: 8px; + max-width: 100%; +} + .home-hero__art { position: absolute; inset: 0; @@ -483,9 +498,8 @@ p { border-bottom: 0; } -/* 1px outer frame on the FAQ block with rounded (12px) corners. ExpandableSection - has no radius token, so we border + clip the wrapper; overflow:hidden trims the items' square - corners to the radius. Internal dividers between questions stay 0.5px (see cloudscape-overrides). */ +/* One outer frame for the FAQ; individual questions only draw internal dividers + (see cloudscape-overrides). Clip their backgrounds to the shared rounded corners. */ .faq-list { border: 1px solid var(--cs-border); border-radius: 12px; @@ -605,16 +619,6 @@ p { font-size: 17px; } -/* Concept-card descriptions: muted, 14px (a step down from the standard small text) since they - sit in a dense card grid. Higher specificity than `.doc-alternating p` so it wins (the cards - sit inside an alternating block). */ -.concept-grid .media-card p { - padding: 0; - font-size: 14px; - line-height: 1.5; - color: var(--cs-muted); -} - /* "Vendor-agnostic, open-source" architecture diagram (components/ArchitectureDiagram.tsx), rebuilt from a static SVG into HTML/CSS and sized 1:1 with it. Every dimension is in cqw (% of the diagram's own width, resolved against the .arch-diagram-wrap container) so the @@ -665,10 +669,11 @@ p { .arch-row--compute .arch-cell { justify-content: center; gap: 0.55cqw; - min-height: calc(8cqw + 6px); + min-height: calc(8cqw - 6px); padding-inline: 1.5cqw; - border: 1px dotted currentColor; - border-radius: 12px; + border: 1px solid currentColor; + border-radius: 9px; + background: var(--cs-bg); } .arch-row--compute .arch-cell--cloud { @@ -774,7 +779,7 @@ p { display: flex; align-items: center; justify-content: center; - min-height: 5.54cqw; /* 50u */ + min-height: 6cqw; padding: 0 0.8cqw; border-radius: 12px; text-align: center; @@ -873,7 +878,7 @@ p { .arch-row--inputs > .arch-cell { grid-column: 1 / -1; } .arch-row--compute { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 16px var(--arch-label-padding); } .arch-row--compute > :first-child { grid-column: 1 / -1; } - .arch-row--compute .arch-cell { min-height: 54px; padding: 11px 8px; border-radius: 8px; } + .arch-row--compute .arch-cell { min-height: 54px; padding: 11px 8px; } .arch-cell { min-height: 52px; padding: 10px var(--arch-label-padding); gap: 12px; border-width: 1px; border-radius: 8px; } .arch-cell__label { font-size: 16px; white-space: normal; } .arch-cell--platform { min-height: 52px; gap: 6px; padding: 8px 4px; } @@ -948,46 +953,6 @@ p { font-size: var(--font-small); } -/* Core-concept cards: three columns inside the AlternatingDocBlock visual slot. */ -.concept-grid-wrap { - container-type: inline-size; - width: 100%; -} - -.concept-grid { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - grid-auto-rows: 1fr; /* equal-height cards across both rows */ - column-gap: 1.72cqw; /* match .arch-row */ - row-gap: 2.66cqw; /* match .arch-diagram */ -} - -/* Each concept card is a whole-card link to the docs with a simple 1px outline. */ -.concept-grid .media-card { - display: block; - color: var(--cs-text); - text-decoration: none !important; - background: transparent; - border: 1px solid currentColor; - border-radius: 12px; - padding: 16px 18px 18px; - transition: background-color 0.15s ease; -} - -.concept-grid .media-card:hover { - background: var(--cs-hover); -} - -.concept-grid .media-card h3 { - display: flex; - align-items: center; - margin: 0 0 6px; - padding: 0; - font-size: 17px; - font-weight: 600; - letter-spacing: -0.01em; -} - /* Quote author name reuses the card-heading size. */ .testimonial-name { font-size: var(--font-card-heading) !important; @@ -1108,7 +1073,12 @@ p { .gs-rail a.gs-opt:focus-visible { border-radius: 8px; background: var(--cs-bg); - box-shadow: inset 0 0 0 0.5px var(--cs-text); + box-shadow: inset 0 0 0 1px var(--cs-text); +} +.site-products-menu .gs-rail:not(:has(a.gs-opt:hover, a.gs-opt:focus-visible)) .gs-opt.gs-opt--on, +.site-products-menu .gs-rail a.gs-opt:hover, +.site-products-menu .gs-rail a.gs-opt:focus-visible { + box-shadow: none; } .gs-rail button.gs-opt:focus-visible { outline: 2px solid var(--cs-text); @@ -1252,7 +1222,8 @@ p { .sky-gpu-prices { flex: 0 0 auto; width: 100%; - border-collapse: collapse; + border-collapse: separate; + border-spacing: 0; font-size: 13px; } .sky-gpu-prices th, @@ -1278,6 +1249,19 @@ p { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; } +.sky-gpu-prices tbody th, +.sky-gpu-prices tbody td { + transition: background-color 0.15s ease; +} +.sky-gpu-prices tbody tr:hover > * { + background: var(--cs-panel); +} +.sky-gpu-prices tbody tr > :first-child { + border-radius: 8px 0 0 8px; +} +.sky-gpu-prices tbody tr > :last-child { + border-radius: 0 8px 8px 0; +} @media (max-width: 480px) { .gs-box--offers .gs-skybody { padding-inline: 16px; @@ -1331,10 +1315,12 @@ p { } @media (max-width: 480px) { - .gs-box--compute .gs-boxfoot { + .gs-box--compute .gs-boxfoot, + .gs-box--compute-sources .gs-boxfoot { flex-wrap: wrap; } - .gs-box--compute .gs-foot__note { + .gs-box--compute .gs-foot__note, + .gs-box--compute-sources .gs-foot__note { flex-basis: 100%; } } @@ -1494,6 +1480,41 @@ p { align-items: flex-start; gap: 11px; } +.gs-cap, +.gs-cloud { + position: relative; + isolation: isolate; + border-radius: 8px; +} +.docs-article a.gs-cap, +.docs-article a.gs-cloud { + color: var(--cs-text); + text-decoration: none !important; +} +/* Extend the hover fill without changing list spacing or text alignment. */ +.gs-cap::before, +.gs-cloud::before { + content: ''; + position: absolute; + inset: -8px -12px; + z-index: -1; + border-radius: inherit; + background: var(--cs-panel); + opacity: 0; + pointer-events: none; + transition: opacity 0.15s ease; +} +.gs-cap:hover::before, +.gs-cloud:hover::before, +.gs-cap:focus-visible::before, +.gs-cloud:focus-visible::before { + opacity: 1; +} +.docs-article a.gs-cap:focus-visible, +.docs-article a.gs-cloud:focus-visible { + outline: 2px solid var(--cs-text); + outline-offset: 4px; +} .gs-cap__ic { flex: 0 0 auto; margin-top: 1px; @@ -1557,7 +1578,7 @@ p { .gs-caps { grid-template-columns: 1fr; } /* Keep footer notes and buttons on one row. */ .gs-boxfoot { align-items: center; gap: 10px; } - .gs-boxfoot [class*='awsui_button'] { padding-inline: 14px !important; } + .gs-boxfoot [class*='awsui_button'] { padding-inline: 14px var(--cta-padding-end, 14px) !important; } } .site-footer { @@ -1848,7 +1869,6 @@ p { .doc-card-grid, .product-grid, - .concept-grid, .testimonial-grid { grid-template-columns: 1fr; } @@ -1976,8 +1996,11 @@ p { .home-hero__actions--single { grid-template-columns: max-content; } - /* Each button fills its half-column; center the label and trim the desktop 34px side + /* Each button fills its half-column; center the label and trim the desktop side padding so both fit. !important: Cloudscape sets text-align:start via a boosted rule. */ + .cta-pair > a { + padding-inline: 16px !important; + } .home-hero__actions [class*='awsui_button'] { width: 100%; padding-inline: 16px !important; diff --git a/website/vite.config.ts b/website/vite.config.ts index ff84e085ac..ca0e5f13b3 100644 --- a/website/vite.config.ts +++ b/website/vite.config.ts @@ -12,6 +12,7 @@ import react from '@vitejs/plugin-react'; export default defineConfig({ base: process.env.BASE_PATH || '/', plugins: [react()], + esbuild: { legalComments: 'inline' }, build: { assetsDir: 'website-assets', rollupOptions: {