style: refine CHRNX canvas and hero

This commit is contained in:
chrnx committed 2026-08-12 14:40:06 -05:00
1 parent c95d8ffa9a
commit f56ea601d2
3 files changed
+111 -19

No files matched your search

+28
View File
@@ -76,6 +76,34 @@ test( 'the visual layer is separately enqueued and covers responsive accessible
assert.match( components, /html\[data-theme="light"\]/ );
} );
test( 'the page canvas is atmospheric rather than a repeating grid', () => {
const components = read( 'assets/css/components.css' );
const bodyRule = components.match( /body,[\s\S]*?:root:not\(\[data-theme\]\) body\s*\{(?<declarations>[\s\S]*?)\n\}/ )?.groups?.declarations ?? '';
assert.match( bodyRule, /background-repeat:\s*no-repeat(?:,\s*no-repeat)*;/ );
assert.doesNotMatch(
bodyRule,
/linear-gradient\([^)]*1px,\s*transparent\s+1px\)[\s\S]*linear-gradient\(90deg,[^)]*1px,\s*transparent\s+1px\)/,
);
assert.doesNotMatch( bodyRule, /background-size:\s*[^;]*(?:2|3)rem\s+(?:2|3)rem/ );
assert.doesNotMatch(
components,
/@media\s*\(max-width:\s*599px\)[\s\S]*?body\s*\{[\s\S]*?background-size:/,
);
} );
test( 'the home introduction declares compact desktop and mobile bounds', () => {
const components = read( 'assets/css/components.css' );
const desktopRule = components.match( /\.chrnx-home\s*>\s*\.chrnx-home-intro\s*\{(?<declarations>[\s\S]*?)\n\}/ )?.groups?.declarations ?? '';
const mobileRules = components.match( /@media\s*\(max-width:\s*599px\)[\s\S]*$/ )?.[ 0 ] ?? '';
const mobileRule = mobileRules.match( /\.chrnx-home\s*>\s*\.chrnx-home-intro\s*\{(?<declarations>[\s\S]*?)\n\t\}/ )?.groups?.declarations ?? '';
assert.match( desktopRule, /min-height:\s*min\((?:6[0-8])vh,\s*42rem\);/ );
assert.match( mobileRule, /min-height:\s*auto;/ );
assert.match( mobileRule, /max-height:\s*34rem;/ );
assert.match( mobileRule, /align-content:\s*start;/ );
} );
test( 'all approved portraits rebuild byte-identically within payload bounds', () => {
const readme = read( 'README.md' );
const documentedCommand = 'mktemp -d "${TMPDIR:-/tmp}/chrnx-responsive.XXXXXX"';