···1818 const footer = read( '../../components/Footer.astro' );
19192020 it( 'links the lexicon under a Docs label', () => {
2121- expect( footer ).toMatch( /href="\/lexicon"[^>]*>[\s\S]*?Docs/ );
2121+ expect( footer ).toMatch( /href=["']\/lexicon["'][^>]*>[\s\S]*?Docs/ );
2222 } );
23232424 it( 'links the future demo publication under a News label', () => {
2525- expect( footer ).toMatch( /href="\/@skypress\.blog"[^>]*>[\s\S]*?News/ );
2525+ expect( footer ).toMatch( /href=["']\/@skypress\.blog["'][^>]*>[\s\S]*?News/ );
2626 } );
27272828 it( 'links the SkyPress source repo on tangled.org with an accessible label and icon', () => {
2929 expect( footer ).toMatch(
3030- /href="https:\/\/tangled\.org\/jeremy\.herve\.bzh\/skypress"[\s\S]*?aria-label=[\s\S]*?<svg/
3030+ /href=["']https:\/\/tangled\.org\/jeremy\.herve\.bzh\/skypress["'][\s\S]*?aria-label=[\s\S]*?<svg/
3131 );
3232 } );
3333} );
+1-1
src/styles/editor-chrome.css
···344344}
345345346346/* Publish success pill — sunrise callback, rises into view (Studio-owned).
347347- Deliberately uses a fixed warm palette, NOT the --sun*/--ink tokens: those
347347+ Deliberately uses a fixed warm palette, NOT the --sun* or --ink tokens: those
348348 flip with the colour scheme, and no single text colour stays legible over a
349349 gradient whose --sun-tint end goes near-black in dark mode. A constant light
350350 sunrise gradient + dark ink keeps the look and clears WCAG AA in both schemes
+43
src/styles/editor-chrome.test.ts
···11+import { readFileSync } from 'node:fs';
22+import { dirname, join } from 'node:path';
33+import { fileURLToPath } from 'node:url';
44+import postcss from 'postcss';
55+import { describe, expect, it } from 'vitest';
66+77+/**
88+ * Regression guard for editor-chrome.css.
99+ *
1010+ * A comment once read "NOT the --sun[star][slash]--ink tokens": that adjacent
1111+ * star-then-slash pair closed the CSS comment early, so the trailing prose plus
1212+ * the next selector collapsed into one invalid rule and the whole
1313+ * `.studio__published` block (gradient, pill shape, centring) was silently
1414+ * dropped by every CSS parser — the publish pill rendered as an unstyled
1515+ * full-width paragraph.
1616+ *
1717+ * Parsing with PostCSS reproduces the browser's tokeniser (first comment close
1818+ * wins), so asserting the styled rule survives catches any future premature
1919+ * comment close.
2020+ */
2121+describe( 'editor-chrome.css', () => {
2222+ it( 'keeps the .studio__published pill rule intact (no premature comment close)', () => {
2323+ const here = dirname( fileURLToPath( import.meta.url ) );
2424+ const css = readFileSync( join( here, './editor-chrome.css' ), 'utf8' );
2525+ const root = postcss.parse( css );
2626+2727+ let pill: postcss.Rule | undefined;
2828+ root.walkRules( '.studio__published', ( rule ) => {
2929+ if ( rule.some( ( node ) => node.type === 'decl' && node.prop === 'background' ) ) {
3030+ pill = rule;
3131+ }
3232+ } );
3333+3434+ expect( pill, '.studio__published rule with a background was dropped' ).toBeDefined();
3535+ const background = pill!.nodes.find(
3636+ ( node ): node is postcss.Declaration => node.type === 'decl' && node.prop === 'background'
3737+ );
3838+ expect( background?.value ).toContain( 'linear-gradient' );
3939+ expect(
4040+ pill!.some( ( node ) => node.type === 'decl' && node.prop === 'width' )
4141+ ).toBe( true );
4242+ } );
4343+} );