fix: let mobile hero grow with content
This commit is contained in:
3 files changed
+61
-21
No files matched your search
@@ -78,30 +78,15 @@ test( 'the visual layer is separately enqueued and covers responsive accessible
|
||||
|
||||
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:/,
|
||||
/linear-gradient\([^)]*1px,\s*transparent\s+1px\)[\s\S]*linear-gradient\(90deg,[^)]*1px,\s*transparent\s+1px\)/,
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
components,
|
||||
/background-size:\s*[^;]*(?:2|3)rem\s+(?:2|3)rem(?:\s*,\s*(?:2|3)rem\s+(?:2|3)rem)?/,
|
||||
);
|
||||
} );
|
||||
|
||||
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', () => {
|
||||
|
||||
Reference in new issue
Block a user