···9999 expect( reduced ).toMatch( /\.shootingstar/ );
100100 } );
101101} );
102102-103103-describe( 'playful: sun becomes moon', () => {
104104- const logo = read( '../../components/Logo.astro' );
105105- const index = read( '../../pages/index.astro' );
106106-107107- it( 'gives the logo mark distinct sun and moon parts', () => {
108108- expect( logo ).toMatch( /class="logo__sun"/ );
109109- expect( logo ).toMatch( /class="logo__moon"/ );
110110- } );
111111-112112- it( 'hides the moon by default so non-landing pages keep the sun', () => {
113113- const style = logo.match( /<style>([\s\S]*?)<\/style>/ )?.[ 1 ] ?? '';
114114- expect( style ).toMatch( /\.logo__moon\s*\{[^}]*display:\s*none/ );
115115- } );
116116-117117- it( 'swaps the mark to the moon for dark phases on the landing only', () => {
118118- const style = index.match( /<style>([\s\S]*?)<\/style>/ )?.[ 1 ] ?? '';
119119- expect( style ).toMatch( /:global\(\s*\[data-phase='night'\]\s*\)[\s\S]*?\.logo__moon/ );
120120- expect( style ).toMatch( /:global\(\s*\[data-phase='night'\]\s*\)[\s\S]*?\.logo__sun/ );
121121- } );
122122-} );
-7
src/pages/index.astro
···233233 color: var(--sky-ink);
234234 }
235235236236- /* Playful: the wordmark's sun becomes a crescent moon at night/dusk (landing only —
237237- data-phase is set on <html> only here, so other pages keep the sun). */
238238- :global([data-phase='night']) .masthead :global(.logo__sun),
239239- :global([data-phase='dusk']) .masthead :global(.logo__sun) { display: none; }
240240- :global([data-phase='night']) .masthead :global(.logo__moon),
241241- :global([data-phase='dusk']) .masthead :global(.logo__moon) { display: block; }
242242-243236 /* Ghost buttons sitting on the sky get a frosted chip so they read at every phase. */
244237 .masthead .btn--ghost,
245238 .hero .btn--ghost {
+3
src/styles/app-bar.css
···2121 text-decoration: none;
2222}
2323.app-bar__mark {
2424+ /* The inline mark inherits this via fill="currentColor"; --sun lightens in dark mode. */
2425 color: var(--sun);
2626+ display: inline-flex;
2527 flex: none;
2828+ line-height: 0;
2629}
2730.app-bar__word {
2831 font-family: var(--font-display);