Касания: подсветка наведения больше не залипает на телефоне

На сенсорном экране :hover после касания остаётся на элементе: после перехода в настройках
строка под пальцем выглядела выбранной, кнопка «назад» на следующем экране – нажатой.
Все правила с :hover (77) теперь внутри @media (hover: hover): с мышью всё как было, на
телефоне подсветки наведения нет. Чтобы нажатие оставалось заметным, там, где у элемента не
было своего :active, а наведение меняло только цвет, фон или рамку, тот же вид получает
:active (46 правил: строки настроек, кнопки шапки, строки уведомлений, поиск и т. д.).
Порядок правил и специфичность не менялись, !important не добавлялось.
This commit is contained in:
q
2026-10-13 04:25:26 +03:00
parent a7a600035a
commit edc3d50136
34 changed files with 319 additions and 152 deletions
+8 -4
View File
@@ -24,7 +24,8 @@
.channel-message-body { margin: 0; font-size: .9375rem; line-height: 1.4375rem; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.channel-message-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.channel-action-item { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 8px; border-radius: 12px; color: var(--text-secondary); cursor: pointer; font-size: .75rem; }
.channel-action-item:hover { color: var(--text-primary); background: var(--surface); }
.channel-action-item:active { color: var(--text-primary); background: var(--surface); }
@media (hover: hover) { .channel-action-item:hover { color: var(--text-primary); background: var(--surface); } }
.channel-action-item.is-liked { color: var(--reaction-active); }
.channel-action-item:disabled { opacity: .5; cursor: wait; }
.channel-action-icon { display: inline-flex; font-size: 22px; line-height: 1; }
@@ -61,7 +62,8 @@
cursor: text;
transition: border-color 160ms ease;
}
.channel-compose-bar:hover { border-color: var(--accent); }
.channel-compose-bar:active { border-color: var(--accent); }
@media (hover: hover) { .channel-compose-bar:hover { border-color: var(--accent); } }
.channel-compose-bar:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.channel-compose-bar__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-compose-bar__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--on-accent); background: var(--accent); flex-shrink: 0; }
@@ -106,7 +108,8 @@
/* Нижняя панель ленты: «Новая запись» у владельца, «Подписаться» у читателя */
.channel-new-post { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: var(--surface-selected); color: var(--action); font: inherit; font-weight: 600; cursor: pointer; }
.channel-new-post svg { width: 21px; height: 21px; }
.channel-new-post:hover { background: color-mix(in srgb, var(--surface-selected) 85%, var(--text-primary)); }
.channel-new-post:active { background: color-mix(in srgb, var(--surface-selected) 85%, var(--text-primary)); }
@media (hover: hover) { .channel-new-post:hover { background: color-mix(in srgb, var(--surface-selected) 85%, var(--text-primary)); } }
.channel-new-post:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.channels-screen--channel, .channels-screen--thread { padding-bottom: 8px; }
@@ -122,7 +125,8 @@
/* Общий :hover кнопок – filter: brightness(); фильтр делает плитку автора контейнером для
абсолютного аватара, и при наведении (на телефоне – после касания) аватар прыгал на текст. */
.channel-message-card--threads .channel-message-author-tile:is(:hover, :active) { filter: none; }
.channel-message-card--threads .channel-message-author-tile:hover .author-line-login { color: var(--accent); }
.channel-message-card--threads .channel-message-author-tile:active .author-line-login { color: var(--accent); }
@media (hover: hover) { .channel-message-card--threads .channel-message-author-tile:hover .author-line-login { color: var(--accent); } }
.channel-message-card--threads .avatar.channel-profile-avatar { width: 36px; height: 36px; min-width: 36px; min-height: 36px; border-radius: 10px; font-size: 15px; }
.channel-message-card--threads .author-line-login { font-size: .9375rem; }
.channel-message-card--threads .channel-message-author .channel-message-time::before { content: none; }