SHA256
На сенсорном экране :hover после касания остаётся на элементе: после перехода в настройках строка под пальцем выглядела выбранной, кнопка «назад» на следующем экране – нажатой. Все правила с :hover (77) теперь внутри @media (hover: hover): с мышью всё как было, на телефоне подсветки наведения нет. Чтобы нажатие оставалось заметным, там, где у элемента не было своего :active, а наведение меняло только цвет, фон или рамку, тот же вид получает :active (46 правил: строки настроек, кнопки шапки, строки уведомлений, поиск и т. д.). Порядок правил и специфичность не менялись, !important не добавлялось.
15 lines
1.8 KiB
CSS
15 lines
1.8 KiB
CSS
/* Строка ввода внизу экрана (обсуждение; тот же рисунок у чата): капсула с полем и эмодзи + круглая отправка */
|
|
.compose-row { display: flex; gap: 6px; align-items: flex-end; }
|
|
.compose-field { flex: 1; min-width: 0; display: flex; align-items: flex-end; padding: 0 6px 0 12px; border: 1px solid var(--border-control); border-radius: 22px; background: var(--surface-raised); }
|
|
.compose-field:focus-within { border-color: var(--accent); }
|
|
.compose-field__input { flex: 1; min-width: 0; min-height: 44px; max-height: 132px; padding: 10px 0; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 1rem; line-height: 1.375rem; resize: none; field-sizing: content; outline: none; }
|
|
.compose-field__input::placeholder { color: var(--text-secondary); }
|
|
.compose-field__emoji { width: 32px; min-width: 32px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-secondary); cursor: pointer; }
|
|
.compose-field__emoji svg { width: 22px; height: 22px; }
|
|
.compose-send { width: 44px; height: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); cursor: pointer; }
|
|
.compose-send svg { width: 22px; height: 22px; stroke-width: 2.2; }
|
|
@media (hover: hover) { .compose-send:hover:not(:disabled) { background: var(--accent-hover); } }
|
|
.compose-send:active:not(:disabled) { background: var(--accent-pressed); }
|
|
.compose-send:disabled { background: var(--disabled-bg); color: var(--disabled-text); cursor: default; }
|
|
.compose-send:focus-visible, .compose-field__emoji:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
|