enable scolling on small devices
Sonarqube Scanner / Build and analyze (push) Successful in 1m5s

This commit is contained in:
Florian Zumpe
2026-09-27 17:20:03 +02:00
parent 40440adc5c
commit 18bb4682a0
2 changed files with 32 additions and 8 deletions
+23
View File
@@ -0,0 +1,23 @@
import assert from 'node:assert/strict';
import fs from 'node:fs/promises';
import path from 'node:path';
import test from 'node:test';
const root = path.resolve(import.meta.dirname, '..');
async function read(relativePath) {
return fs.readFile(path.join(root, relativePath), 'utf8');
}
test('bootstrap screen remains vertically scrollable on small displays', async () => {
const css = await read('public/css/bootstrap.css');
const bootstrapRule = css.match(/#bootstrap-screen\s*\{([\s\S]*?)\}/)?.[1] ?? '';
const cardRule = css.match(/#bootstrap-screen\s*>\s*section\s*\{([\s\S]*?)\}/)?.[1] ?? '';
assert.match(bootstrapRule, /overflow-y:\s*auto/);
assert.match(bootstrapRule, /overflow-x:\s*hidden/);
assert.match(bootstrapRule, /touch-action:\s*pan-y/);
assert.match(bootstrapRule, /-webkit-overflow-scrolling:\s*touch/);
assert.match(bootstrapRule, /align-items:\s*safe center/);
assert.match(cardRule, /box-sizing:\s*border-box/);
});