SHA256
На сенсорном экране :hover после касания остаётся на элементе: после перехода в настройках строка под пальцем выглядела выбранной, кнопка «назад» на следующем экране – нажатой. Все правила с :hover (77) теперь внутри @media (hover: hover): с мышью всё как было, на телефоне подсветки наведения нет. Чтобы нажатие оставалось заметным, там, где у элемента не было своего :active, а наведение меняло только цвет, фон или рамку, тот же вид получает :active (46 правил: строки настроек, кнопки шапки, строки уведомлений, поиск и т. д.). Порядок правил и специфичность не менялись, !important не добавлялось.
70 lines
8.2 KiB
CSS
70 lines
8.2 KiB
CSS
/* Обсуждение (макет V4): контекст записи, «Комментарии · N», плоский список, строка ввода. */
|
|
.channels-screen--thread { gap: 0; }
|
|
.thread-block { display: grid; gap: 0; min-width: 0; }
|
|
|
|
.thread-section-title { margin: 12px 0 4px; font-size: .8125rem; font-weight: 600; color: var(--text-primary); }
|
|
.thread-group { position: relative; padding: 12px 0 6px; }
|
|
.thread-group + .thread-group { border-top: 1px solid var(--border-subtle); }
|
|
.channels-screen .thread-comment { cursor: pointer; position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; scroll-margin: 16px; }
|
|
.channels-screen .thread-comment--nested { grid-template-columns: 28px minmax(0, 1fr); margin-top: 10px; }
|
|
.thread-comment.is-highlight { background: var(--surface-selected); box-shadow: 0 0 0 6px var(--surface-selected); border-radius: 4px; }
|
|
.thread-comment__who { align-self: start; padding: 0; border: 0; background: transparent; cursor: pointer; }
|
|
.thread-comment__who .avatar.thread-comment__avatar { width: 36px; height: 36px; min-width: 36px; min-height: 36px; font-size: 14px; }
|
|
.thread-comment--nested .thread-comment__who .avatar.thread-comment__avatar { width: 28px; height: 28px; min-width: 28px; min-height: 28px; font-size: 12px; }
|
|
.thread-comment__main { min-width: 0; }
|
|
.thread-comment__head { display: flex; align-items: center; gap: 6px; min-height: 22px; }
|
|
.thread-comment__name { min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: .9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
|
|
.thread-comment__badge { padding: 1px 6px; border-radius: 6px; background: var(--surface-selected); color: var(--action); font-size: .6875rem; white-space: nowrap; }
|
|
.thread-comment__head time { flex-shrink: 0; color: var(--text-secondary); font-size: .875rem; }
|
|
.thread-comment__head .thread-comment__more { width: 36px; min-width: 36px; height: 28px; min-height: 28px; margin: -4px -8px -4px auto; padding: 0; border: 0; background: transparent; color: var(--text-secondary); }
|
|
.thread-comment__head .thread-comment__more svg { width: 20px; height: 20px; }
|
|
.thread-comment__mention { display: inline-flex; align-items: center; gap: 3px; margin: 1px 0 0; padding: 0; border: 0; background: transparent; color: var(--action); font: inherit; font-size: .8125rem; cursor: pointer; }
|
|
.thread-comment__mention svg { width: 14px; height: 14px; }
|
|
.thread-comment__text { margin: 2px 0 0; font-size: .9375rem; line-height: 1.4375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
.thread-comment__actions { display: flex; align-items: center; gap: 4px; margin: 2px 0 0 -10px; color: var(--text-secondary); }
|
|
.thread-comment__actions > button { min-height: 36px; min-width: 40px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: .8125rem; cursor: pointer; }
|
|
.thread-comment__actions svg { width: 19px; height: 19px; }
|
|
.thread-comment__actions span:empty { display: none; }
|
|
|
|
/* Ветка: ответы на ответы одной колонкой со сдвигом под аватар, от аватара родителя – линия с изгибом к каждому ответу. */
|
|
.thread-replies { position: relative; margin-left: 46px; }
|
|
.thread-replies > .thread-comment::before { content: ''; position: absolute; top: -10px; left: -29px; width: 22px; height: 24px; border-left: 2px solid var(--border-control); border-bottom: 2px solid var(--border-control); border-bottom-left-radius: 12px; pointer-events: none; }
|
|
.thread-replies > :not(:last-child)::after { content: ''; position: absolute; top: 0; bottom: -10px; left: -29px; border-left: 2px solid var(--border-control); pointer-events: none; }
|
|
.thread-group.has-replies > .thread-comment:first-child::after { content: ''; position: absolute; top: 40px; bottom: -12px; left: 17px; border-left: 2px solid var(--border-control); pointer-events: none; }
|
|
.thread-replies:not(.is-expanded) > .is-collapsed { display: none; }
|
|
.thread-more { position: relative; display: block; min-height: 36px; margin-top: 6px; padding: 0; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
|
|
.thread-replies > .thread-more::before { content: ''; position: absolute; top: -6px; left: -29px; width: 22px; height: 24px; border-left: 2px solid var(--border-control); border-bottom: 2px solid var(--border-control); border-bottom-left-radius: 12px; }
|
|
.thread-more:active { color: var(--text-primary); }
|
|
@media (hover: hover) { .thread-more:hover { color: var(--text-primary); } }
|
|
.thread-more--deeper { color: var(--action); font-weight: 500; }
|
|
|
|
/* Цепочка над открытым ответом: звенья соединены линией от аватара к следующему. */
|
|
.thread-block--ancestors { padding-top: 12px; }
|
|
.channels-screen .thread-comment--ancestor { padding-bottom: 14px; }
|
|
.thread-comment--ancestor::after { content: ''; position: absolute; top: 42px; bottom: 0; left: 17px; border-left: 2px solid var(--border-control); pointer-events: none; }
|
|
.thread-comment--ancestor .avatar.channel-profile-avatar { width: 36px; height: 36px; min-width: 36px; min-height: 36px; border-radius: 10px; font-size: 15px; }
|
|
.thread-block--ancestors + .thread-block--focus .channel-message-card--threads-focus { padding-top: 0; }
|
|
|
|
.thread-quote { display: block; width: 100%; margin: 0 0 7px; padding: 5px 9px; border: 0; border-left: 2px solid var(--quote-line); border-radius: 0 6px 6px 0; background: var(--quote-bg); color: var(--text-secondary); font: inherit; font-size: .75rem; line-height: 1.125rem; text-align: left; cursor: pointer; }
|
|
.thread-quote strong { display: block; color: var(--action); font-weight: 500; }
|
|
.thread-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
button.thread-quote:active { background: var(--surface); }
|
|
@media (hover: hover) { button.thread-quote:hover { background: var(--surface); } }
|
|
.thread-return { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; padding: 9px 12px; border: 1px solid var(--border-subtle); border-radius: 20px; background: var(--surface-raised); color: var(--text-primary); font: inherit; font-size: .75rem; white-space: nowrap; cursor: pointer; }
|
|
.thread-empty { padding: 36px 20px; text-align: center; }
|
|
|
|
|
|
/* Отдельная публикация в обсуждении использует карточку и действия из ленты. */
|
|
.thread-block--focus > .channel-message-card { margin-bottom: 8px; }
|
|
|
|
/* Строка ответа внизу обсуждения (как в Threads): аватар, поле-кнопка, «прикрепить», «развернуть». */
|
|
.thread-reply-bar { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 48px; padding: 0 6px 0 8px; border: 1px solid var(--border-control); border-radius: 24px; background: var(--surface); }
|
|
.thread-reply-bar .avatar.thread-reply-bar__avatar { width: 30px; height: 30px; min-width: 30px; min-height: 30px; font-size: 12px; }
|
|
.thread-reply-bar__field { flex: 1; min-width: 0; min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 1rem; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
|
|
.thread-reply-bar__icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
|
|
.thread-reply-bar__icon:active { color: var(--text-primary); background: var(--surface-selected); }
|
|
@media (hover: hover) { .thread-reply-bar__icon:hover { color: var(--text-primary); background: var(--surface-selected); } }
|
|
.thread-reply-bar__icon svg { width: 22px; height: 22px; }
|
|
.thread-reply-bar__field:focus-visible, .thread-reply-bar__icon:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
|
|
.thread-reply-guest { width: 100%; display: grid; }
|