.content { word-break: break-word; .image-list-container { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: masonry; &.image-list-odd { :first-child { grid-column: 1 / 3; } } } img { width: calc(100% - var(--box-margin)); } > pre { width: calc(100% - var(--box-margin)); max-width: 456px; overflow-x: auto; } .tgme_widget_message_link_preview { margin-top: 16px; display: none; .link_preview_site_name, .link_preview_title, .link_preview_description { display: none; } } .tgme_widget_message_link_preview:has(.link_preview_site_name) { display: block; background: var(--cell-background-color); border-left: 3px solid var(--highlight-color); padding: 6px; padding-left: 10px; border-radius: var(--box-border-radius); .link_preview_title { display: block; font-size: 1em; font-weight: bolder; line-height: 2; } .link_preview_description { display: block; font-size: 0.8em; line-height: 1.5; } } .tgme_widget_message_video, .tgme_widget_message_roundvideo { aspect-ratio: 1 / 1; } .tgme_widget_message_link_preview:has(.link_preview_image) { display: flex; position: relative; border: none; padding: 0; background: transparent; .link_preview_image { aspect-ratio: 1200 / 630; object-fit: cover; } .link_preview_site_name { display: block; position: absolute; bottom: var(--box-margin); left: var(--box-margin); padding-left: 4px; padding-right: 4px; background-color: rgba(0, 0, 0, 0.66); font-size: 14px; color: #fff; line-height: 1.5; border-radius: var(--box-border-radius); text-overflow: ellipsis; max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; } .link_preview_title, .link_preview_description { display: none; } } blockquote { margin: 16px 0; font-size: 0.8em; background: var(--cell-background-color); border-left: 3px solid var(--highlight-color); padding: 6px; padding-left: 10px; border-radius: var(--box-border-radius); } .tg-expandable { margin: 16px 0; font-size: 0.8em; background: var(--cell-background-color); border-left: 3px solid var(--highlight-color); padding: 6px; padding-left: 10px; padding-right: 30px; border-radius: var(--box-border-radius); position: relative; min-height: 3.6em; } .tg-expandable__checkbox { display: none; } .tg-expandable__content { display: block; user-select: text; } /* use @supports to check :has() support */ @supports selector(:has(*)) { /* when :has() is supported, default to collapsed */ .tg-expandable__content { display: -webkit-box; line-clamp: 3; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } /* when checkbox is checked, expand */ .tg-expandable:has(.tg-expandable__checkbox:checked) .tg-expandable__content { display: block; line-clamp: unset; -webkit-line-clamp: unset; -webkit-box-orient: unset; overflow: visible; padding-bottom: 24px; } } .tg-expandable__toggle { /* default hidden, not show small triangle when :has() is not supported */ display: none; } @supports selector(:has(*)) { .tg-expandable__toggle { display: block; position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; cursor: pointer; user-select: none; z-index: 2; } .tg-expandable__toggle::after { content: ''; display: block; width: 0; height: 0; border-left: 6px solid var(--secondary-color); border-top: 6px solid transparent; border-bottom: 6px solid transparent; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: transform 0.2s ease; filter: var(--icon-secondary-filter); } .tg-expandable:has(.tg-expandable__checkbox:checked) .tg-expandable__toggle::after { transform: translate(-50%, -50%) rotate(90deg); } } .tgme_widget_message_sticker { display: block; } &:has(.tgme_widget_message_user_photo) { display: flex; .tgme_widget_message_user_photo { width: 60px; height: 60px; } } .tgme_widget_message_voice { display: block !important; } .tgme_widget_message_video_wrap { display: none; } .tgme_widget_message_poll_options { display: block; .tgme_widget_message_poll_option_percent { float: left; margin-right: 8px; } } .tgme_widget_message_location_wrap { display: block; .tgme_widget_message_location { padding-top: 50%; background: no-repeat center; background-size: cover; } } .emoji { font-style: normal; margin-right: 2px; } .tg-emoji { width: 1.15em; height: 1.15em; vertical-align: -0.15em; } .sticker { box-shadow: none; border: none; } .spoiler-button { cursor: pointer; input { display: none; } tg-spoiler { color: transparent; margin: auto 2px; border-radius: var(--box-border-radius); background: #ccc 60% 60% / 3000px 3000px; background-image: repeating-conic-gradient(#999 0 0.0001%, #0000 0 0.0002%); } input:checked + tg-spoiler { background: unset; color: unset; } } } .reaction-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; } .reaction-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; font-size: 12px; color: var(--secondary-color); background: var(--code-background-color); border: 1px solid var(--border-color); border-radius: 999px; } .reaction-pill-paid { background: rgba(255, 196, 0, 0.12); border-color: rgba(255, 196, 0, 0.35); color: #9a6a00; } .reaction-emoji { display: inline-flex; align-items: center; font-size: 14px; line-height: 1; } .reaction-emoji img { width: 1em; height: 1em; display: block; } .reaction-count { font-weight: 500; font-variant-numeric: tabular-nums; opacity: 0.8; } .tag-box { flex-wrap: wrap; } [popover] { display: none; &:popover-open { display: block; } } .image-preview-wrap { display: block; } .image-preview-button { appearance: none; outline: none; border: none; background: transparent; padding: 0; margin-bottom: 16px; } .modal { position: fixed; top: 0px; left: 0px; z-index: 1000; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(20px); } .modal-img { margin: auto; max-width: calc(100% - 40px) !important; max-height: calc(100% - 40px) !important; border-radius: var(--media-border-radius); border: 1px solid var(--border-color); box-shadow: var(--shadows); cursor: pointer; object-fit: scale-down; } @media screen and (min-width: 600px) { .modal-img { max-width: calc(100% - 80px) !important; max-height: calc(100% - 80px) !important; } }