style: polish responsive typography and transcript states
Deploy Speaking Practice / deploy (push) Successful in 2m13s
Deploy Speaking Practice / deploy (push) Successful in 2m13s
This commit is contained in:
1 parent
cd29764963
commit
67dcea21d0
10 files changed
+291
-75
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const css = readFileSync(join(__dirname, "..", "styles.css"), "utf8");
|
||||
|
||||
assert.match(
|
||||
css,
|
||||
/--font-sans:\s*Inter,\s*"Noto Sans SC",\s*"Microsoft YaHei UI",\s*"PingFang SC"/,
|
||||
"global font stack should pair polished Latin and Chinese UI fonts",
|
||||
);
|
||||
|
||||
assert.match(
|
||||
css,
|
||||
/body\s*\{[\s\S]*font-family:\s*var\(--font-sans\);[\s\S]*line-height:\s*1\.5;[\s\S]*text-rendering:\s*optimizeLegibility;[\s\S]*-webkit-font-smoothing:\s*antialiased;/,
|
||||
"body should use the shared font stack with improved rendering",
|
||||
);
|
||||
|
||||
assert.match(
|
||||
css,
|
||||
/\.brand h1\s*\{[\s\S]*font-weight:\s*760;[\s\S]*letter-spacing:\s*0;/,
|
||||
"brand title should use a refined strong weight",
|
||||
);
|
||||
|
||||
assert.match(
|
||||
css,
|
||||
/\.home-card-body h3\s*\{[\s\S]*font-weight:\s*760;[\s\S]*line-height:\s*1\.35;/,
|
||||
"home card titles should be less heavy and easier to scan",
|
||||
);
|
||||
Reference in new issue
Block a user