diff --git a/README.md b/README.md index a2d7881..eee0f92 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ identity. `logo` and `byline` are optional. The logo draws before the title and the byline after it, in the muted color and a step smaller, inside the same link to -`href`. The byline hides below 640px. Left out, the bar shows only the title. +`href`. The byline shows on phones too and hides only below 340px. Left out, the bar shows only the title. The pills in the middle of the bar show from 1024px. Below that width the sections are reachable another way: diff --git a/package.json b/package.json index 3936e4a..d341aa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@withmarfa/docs-kit", - "version": "0.0.1-alpha.6", + "version": "0.0.1-alpha.7", "description": "The shared look and plumbing of WithMarfa's documentation sites: Fumadocs layout, components, styles, agent surfaces and search.", "license": "Apache-2.0", "type": "module", diff --git a/src/components/site-header.test.tsx b/src/components/site-header.test.tsx index 6a1e699..15d1d7c 100644 --- a/src/components/site-header.test.tsx +++ b/src/components/site-header.test.tsx @@ -42,12 +42,13 @@ describe('the name in the top bar', () => { expect(container.querySelectorAll('a')).toHaveLength(1); }); - it('mutes the byline, sets it a step smaller and hides it below 640px', () => { + it('mutes the byline, sets it a step smaller and hides it only on the narrowest phones', () => { render(); const byline = [...home().children].find((child) => child.textContent === 'by Acme')!; expect(byline.className).toContain('text-fd-muted-foreground'); expect(byline.className).toContain('text-[0.8125rem]'); - expect(byline.className).toContain('max-sm:hidden'); + expect(byline.className).toContain('max-[340px]:hidden'); + expect(byline.className).not.toContain('max-sm:hidden'); }); it('takes a logo without a byline', () => { diff --git a/src/components/site-header.tsx b/src/components/site-header.tsx index 0b45c42..22051b1 100644 --- a/src/components/site-header.tsx +++ b/src/components/site-header.tsx @@ -76,7 +76,7 @@ export function HeaderBar({ href: string; /** Drawn before the title, inside the same link. */ logo?: ReactNode; - /** Drawn after the title, quieter and a step smaller. It hides below 640px, where the bar needs the room. */ + /** Drawn after the title, quieter and a step smaller. It hides only below 340px, where the bar needs the room. */ byline?: string; center?: ReactNode; actions: ReactNode; @@ -90,7 +90,7 @@ export function HeaderBar({ {logo} {logo || byline ? {title} : title} {byline ? ( - + {byline} ) : null}