Files
q edc3d50136 Касания: подсветка наведения больше не залипает на телефоне
На сенсорном экране :hover после касания остаётся на элементе: после перехода в настройках
строка под пальцем выглядела выбранной, кнопка «назад» на следующем экране – нажатой.
Все правила с :hover (77) теперь внутри @media (hover: hover): с мышью всё как было, на
телефоне подсветки наведения нет. Чтобы нажатие оставалось заметным, там, где у элемента не
было своего :active, а наведение меняло только цвет, фон или рамку, тот же вид получает
:active (46 правил: строки настроек, кнопки шапки, строки уведомлений, поиск и т. д.).
Порядок правил и специфичность не менялись, !important не добавлялось.
2026-10-13 04:25:26 +03:00

95 lines
3.8 KiB
CSS

/* Уведомления: плоский список как в чатах – аватар, имя и время, ниже текст; тонкие разделители от текста. */
.notifications-screen { align-content: start; }
.notifications-screen .notification-feed-tabs { margin-bottom: var(--space-1); }
.notifications-list { display: grid; }
.notification-group-title {
margin: 0;
padding: var(--space-3) 0 var(--space-1);
color: var(--text-secondary);
font-size: var(--text-xs);
line-height: var(--leading-xs);
font-weight: var(--weight-bold);
}
.notification-card {
position: relative;
display: grid;
grid-template-columns: 40px minmax(0, 1fr);
gap: var(--space-3);
padding: var(--space-3) 0 0;
border-radius: var(--radius-md);
}
.notification-avatar { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
.notification-card__body {
display: grid;
gap: 2px;
min-width: 0;
padding-bottom: var(--space-3);
border-bottom: 1px solid var(--divider-soft);
}
.notification-card__head { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.notification-card__name {
flex: 1 1 auto;
min-width: 0;
color: var(--text-primary);
font-size: var(--text-md);
font-weight: var(--weight-bold);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.notification-card__time { flex: 0 0 auto; color: var(--text-secondary); font-size: var(--text-xs); }
/* Непрочитанное: точка-акцент перед временем. */
.notification-card--new .notification-card__time::before {
content: "";
display: inline-block;
width: 7px;
height: 7px;
margin-right: 6px;
border-radius: 50%;
background: var(--accent);
vertical-align: 1px;
}
.notification-card__action { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-sm); }
.notification-card__text {
margin: 0;
color: var(--text-primary);
font-size: var(--text-md);
line-height: var(--leading-md);
white-space: pre-wrap;
overflow-wrap: anywhere;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.notification-engagement { display: flex; align-items: center; gap: var(--space-4); padding-top: var(--space-1); color: var(--text-secondary); }
.notification-engagement-item { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); line-height: 1; }
.notification-engagement-icon { display: inline-flex; }
.notification-engagement-icon svg { width: 14px; height: 14px; }
.notification-card--clickable { cursor: pointer; }
.notification-card--clickable:active { background: color-mix(in srgb, var(--surface-selected) 45%, transparent); }
@media (hover: hover) { .notification-card--clickable:hover { background: color-mix(in srgb, var(--surface-selected) 45%, transparent); } }
.notification-card--clickable:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.notification-empty-state { margin-top: var(--space-5); padding: var(--space-5) var(--space-4); text-align: center; justify-items: center; }
.notification-empty-state strong { color: var(--text-primary); font-size: var(--text-md); }
.notification-empty-state .meta-muted { max-width: 30ch; font-size: var(--text-sm); }
/* «Дружить в ответ» прямо в уведомлении о дружбе. */
.notification-card__answer { justify-self: start; min-height: 34px; margin-top: var(--space-2); padding: 0 14px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: var(--weight-bold); }
.notification-card__answered { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-2); color: var(--success); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.notification-card__answered svg { width: 16px; height: 16px; }