mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Run `npm run format` and `npm run lint`. Fix stylelint configuration to correctly parse variables with units in their names. Migrate raw CSS measurements to tokens in `css/tokens.css` and update usages in `css/tailwind.source.css` and HTML templates. Improve `scripts/check-design-tokens.mjs` to handle variable names with unit-like suffixes. Files changed: - css/tailwind.source.css (formatted and fixed lint) - css/tokens.css (added tokens) - stylelint.config.cjs (fixed regex) - scripts/check-design-tokens.mjs (improved detection logic) - components/profile-modal.html (fixed arbitrary values) - index.html (fixed arbitrary values)
32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
|
|
import { chromium } from 'playwright';
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
(async () => {
|
|
const browser = await chromium.launch();
|
|
const page = await browser.newPage();
|
|
|
|
// Navigate to the index page locally
|
|
await page.goto('file://' + process.cwd() + '/index.html');
|
|
|
|
// Set viewport to simulate mobile for some checks
|
|
await page.setViewportSize({ width: 375, height: 667 });
|
|
|
|
// Wait for Tailwind classes to be effective
|
|
await page.waitForTimeout(1000);
|
|
|
|
// Take screenshot of mobile view (to verify search bar width fix)
|
|
// The search bar is hidden by default, we might need to reveal it or just check layout.
|
|
// The class was: fixed bottom-6 right-6 z-50 hidden w-[calc(100%-var(--sidebar-mobile-gutter))]
|
|
// We can try to make it visible.
|
|
await page.evaluate(() => {
|
|
const el = document.getElementById('mobileSearchContainer');
|
|
if (el) el.classList.remove('hidden');
|
|
});
|
|
|
|
await page.screenshot({ path: 'verification/mobile-view.png' });
|
|
|
|
await browser.close();
|
|
})();
|