diff --git a/src/pages/index.astro b/src/pages/index.astro index 4399d81..6956153 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -74,7 +74,7 @@ const base = import.meta.env.BASE_URL; diff --git a/src/styles/global.css b/src/styles/global.css index a40b30e..0077158 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -21,6 +21,7 @@ --line: #e2e6ec; --bg: #ffffff; --card: #ffffff; + --soft: #f5f6f8; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06); --width: 1100px; --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; @@ -37,6 +38,7 @@ --line: #273042; --bg: #0f1522; --card: #172033; + --soft: #161e2e; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); } } @@ -77,7 +79,7 @@ img { max-width: 100%; height: auto; } [hidden] { display: none !important; } .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } .hello { display: flex; align-items: center; gap: 24px; margin: 28px 0 40px; } -.hello-text { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; } +.hello-text { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; } .welcome { margin: 0; color: var(--ink); font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; @@ -90,30 +92,31 @@ img { max-width: 100%; height: auto; } .hello-text { display: contents; } .welcome { grid-area: 1 / 1; } .hello-logo { grid-area: 1 / 2; width: 64px; height: 64px; align-self: center; } - .search { grid-area: 2 / 1 / 3 / 3; max-width: none; } + .search { grid-area: 2 / 1 / 3 / 3; } .search-key { display: none; } } -/* the box: as wide as a tile and a half, a soft field with the magnifier, - * the word and the shortcut - the look of the search in the docs' bar */ -.search { position: relative; max-width: 480px; } +/* the box: a quiet pill under the greeting - a soft fill, no border, muted + * type; it only shows its edge when the reader is in it */ +.search { position: relative; max-width: 190px; } .search-field { - display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 14px; - border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: text; - transition: border-color .15s, box-shadow .15s; + display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 8px 0 11px; + border: 1px solid transparent; border-radius: 16px; background: var(--soft); cursor: text; + transition: border-color .15s, background-color .15s; } -.search-field:hover { border-color: var(--muted); } -.search-field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); } -.search-icon { width: 18px; height: 18px; flex: none; color: var(--muted); } +.search-field:hover { border-color: var(--line); } +.search-field:focus-within { border-color: var(--brand); background: var(--card); } +.search-icon { width: 14px; height: 14px; flex: none; color: var(--muted); opacity: .7; } .search-field input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; - color: var(--ink); font: inherit; font-size: 15px; + color: var(--ink); font: inherit; font-size: 13.5px; } -.search-field input::placeholder { color: var(--muted); } +.search-field input::placeholder { color: var(--muted); opacity: .8; } .search-field input::-webkit-search-cancel-button { display: none; } +/* the shortcut in a small key cap, as in the docs' bar */ .search-key { - flex: none; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; - font: 500 12px/1.6 var(--font); color: var(--muted); white-space: nowrap; + flex: none; padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; + font: 500 10.5px/1.5 var(--font); color: var(--muted); white-space: nowrap; } .search-field:focus-within .search-key { visibility: hidden; } @media (hover: none) { .search-key { display: none; } }