Files
Harvey_Team_Page/design/brand-marks-2026-10-14/debug-scale.cjs
T
FastD e352335822 Filter bar with hover layer, icon-only project links, design reports
Filters: the panel is a bar (status segment, always visible) plus a body that lives as a layer
under it - collapsed by default, expands on hover/focus/tap and never moves the case grid; the
reset control appears only when a facet is limited; width capped at 720px (measured 45px slack
against 477px before). Facet research report is included.

Links: project links in the mini card and in the project window are icon-only buttons with a
uniform slot (16px card / 18px window) and the accessible name in aria-label; studio contacts
(mail, VK, RuStore) live outside the cards.

Team and page: real photos from the public TITANS team page go to the member window while the
card keeps the mascot; the portfolio gains the First Step Radio card and genre values, the
process block became an individual-approach section, plus a cookie bar and a removable ticker.

Design folders under design/ keep reports, measurements, scripts and the .pen; probe and
before/after screenshot dumps, editor backups and caches are removed. Background-variant and
palette previews stay until the client picks one.
2026-10-15 05:50:52 +03:00

31 lines
1.5 KiB
JavaScript

const { launch } = require('./pw.cjs');
(async () => {
const b = await launch();
const p = await b.newPage();
await p.setContent('<body style="margin:0"></body>');
const res = await p.evaluate(async () => {
const mk = (w, h) => '<svg xmlns="http://www.w3.org/2000/svg" style="display:block;width:' + w + 'px;height:' + h +
'px" viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="#0077FF"/></svg>';
const run = async (s, px) => {
const url = 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(s)));
const img = new Image();
await new Promise((r, j) => { img.onload = r; img.onerror = j; img.src = url; });
const c = document.createElement('canvas'); c.width = c.height = px;
const ctx = c.getContext('2d'); ctx.drawImage(img, 0, 0, px, px);
const d = ctx.getImageData(0, 0, px, px).data;
let minX = 1e9, maxX = -1;
for (let y = 0; y < px; y++) for (let x = 0; x < px; x++) {
if (d[(y * px + x) * 4 + 3] > 0) { if (x < minX) minX = x; if (x > maxX) maxX = x; }
}
return { native: img.naturalWidth + 'x' + img.naturalHeight, canvas: px, inkW: maxX - minX + 1, minX };
};
return {
styleAttrs: await run(mk(256, 256), 4096),
cssVar: await run('<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="#0077FF"/></svg>', 4096),
small: await run(mk(16, 16), 768)
};
});
console.log(JSON.stringify(res, null, 1));
await b.close();
})();