From a545df4005c3b12e8a8483e6127df8d2ba9510a6 Mon Sep 17 00:00:00 2001 From: wasrusgen Date: Sun, 17 May 2026 12:30:38 +0300 Subject: [PATCH] =?UTF-8?q?fix(privacy):=20opacity:0=20=D0=B2=D0=BC=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=BE=20transparent=20=E2=80=94=20=D0=B1=D0=B5?= =?UTF-8?q?=D0=B7=20=D0=B4=D1=8B=D1=80=D0=BA=D0=B8-=D1=81=D0=B8=D0=BB?= =?UTF-8?q?=D1=83=D1=8D=D1=82=D0=B0=20=D0=B1=D1=83=D0=BA=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 6 ++++-- miniapp/assets/styles.css | 6 ++++-- miniapp/index.html | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 200ff90..351a9d9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,7 +50,9 @@ deploy/ → docker-compose.yml, Caddyfile.snippet ## Типичные ошибки (уже были) -1. **`color: var(--card)` для скрытия текста** → не работает в тёмных Telegram-темах. Используй `color: transparent` -2. **Новый JS-класс без CSS** → текст наследует `color: var(--ink)` от body → видим на фоне карточки +1. **`color: var(--card)` для скрытия текста** → не работает: `--card` зависит от Telegram-темы и может не совпадать с фактическим фоном +2. **`color: transparent` для скрытия текста** → НЕ использовать: создаёт "дырку" — буквы просвечивают фон страницы за карточкой, силуэт текста виден +3. **Правильный способ скрыть текст** → `opacity: 0` — элемент невидим полностью, место сохраняет, никаких артефактов +4. **Новый JS-класс без CSS** → текст наследует `color: var(--ink)` от body → видим на фоне карточки 3. **Не бамп версии** → WebView грузит старый кэш → изменения не видны 4. **`var(--card)` как фон у hero-секции** → при изменении темы текст становится невидимым (светлый текст на светлом фоне). Решение: явный `color: var(--ink)` inline diff --git a/miniapp/assets/styles.css b/miniapp/assets/styles.css index b4d11af..c177606 100644 --- a/miniapp/assets/styles.css +++ b/miniapp/assets/styles.css @@ -1422,7 +1422,8 @@ html[data-variant="d"] .section-head .label { font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; - color: transparent; + color: var(--ink); + opacity: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; @@ -1434,7 +1435,8 @@ html[data-variant="d"] .section-head .label { font-size: 9.5px; font-weight: 500; letter-spacing: 0.05em; - color: transparent; + color: var(--ink); + opacity: 0; margin-top: 2px; } diff --git a/miniapp/index.html b/miniapp/index.html index 2d39a7b..2c2c606 100644 --- a/miniapp/index.html +++ b/miniapp/index.html @@ -12,7 +12,7 @@ - +