142 Commits

Author SHA1 Message Date
Karl Stolley
a64276c58f media: Replace legacy .message_inline_image class.
This introduces two new replacement classes, depending on
whether the inner content is an image or a video.
2025-09-17 13:25:50 -07:00
Karl Stolley
8a40b0699a audio: Present download button with tooltip.
Fixes #35636.
2025-08-28 15:20:11 -07:00
Karl Stolley
cacd73fd8b audio: Present audio player in wrapped element. 2025-08-28 15:20:11 -07:00
Anders Kaseorg
72e762f075 stylelint: Fix property-no-deprecated.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-08-14 21:37:50 -07:00
Karl Stolley
d089c42c98 markdown: Reduce space when paragraphs precede lists. 2025-08-08 12:06:55 -07:00
Karl Stolley
42014f2f79 site_previews: Don't hide overflow on data-container.
Because both .message_embed_title and
.message_embed_description manage their own overflow,
there's no need to set it on the outer container,
which can clip the top of the letters on message titles
under certain circumstances.
2025-08-06 17:04:04 -07:00
Karl Stolley
c974b3c05c audio_player: Allow resizing to message area on narrow viewports. 2025-08-06 10:45:31 -07:00
Karl Stolley
32da008335 audio_player: Improve vertical alignment. 2025-08-06 10:45:31 -07:00
Karl Stolley
b37a78c7b3 audio_player: Do not interfere with native player display. 2025-08-06 10:45:31 -07:00
Karl Stolley
6e9ad5faf1 audio_player: Reference audio via .media-audio-element class. 2025-08-06 10:45:31 -07:00
Karl Stolley
7e6773dc73 audio_player: Remove shadow-DOM CSS adjustments. 2025-08-06 10:45:31 -07:00
Karl Stolley
95dfb4aa41 rendered_markdown: Reduce space between paragraphs and nested lists. 2025-08-05 13:38:22 -07:00
Karl Stolley
b87d22c9fa rendered_markdown: Remove now-unnecessary layout adjustments. 2025-08-04 12:55:53 -07:00
Karl Stolley
a07ed96526 message_row: Align content, not items. 2025-08-04 12:55:53 -07:00
Karl Stolley
9d1908d746 rendered_markdown: Correct alignment on textless images. 2025-07-30 13:16:10 -07:00
Rohan Gudimetla
3ec0439c89 markdown: Tweak audio element styles for chromium based browsers.
This commit tweaks some styles for audio elements of chromium
based browsers using `webkit` so as to render them in styles
similar to firefox.
2025-07-16 17:01:06 -07:00
Shubham Padia
4d081c6124 markdown: Make start border of link previews and blockquotes same.
We also want to align them alongside making them look same.
https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.93.82.20message_inline_ref.20dropbox.20links/near/2191600
2025-06-24 13:48:01 -07:00
Shubham Padia
83755c1aec markdown: Remove unused message_inline_ref.
Fixes #32640.
We cannot remove the styles yet since older dropbox previews will still
be using them. We can remove those in a followup issue.
2025-06-24 13:48:01 -07:00
Karl Stolley
74b0d8ff61 rendered_markdown: Correct presentation of nested lists.
To properly increment counters, and display lists of the
correct type when nested, we need to use child selectors
and not the previous, overly generic descendant selectors.
2025-06-11 14:56:35 -07:00
Karl Stolley
6192341830 thumbnails: Use more muted background, high-contrast hover. 2025-05-21 15:23:24 -07:00
Karl Stolley
115411ca4a markdown: Present message embeds with logical props. 2025-05-21 15:19:08 -07:00
Karl Stolley
753fb56b31 markdown: Present blockquotes with logical props. 2025-05-21 15:19:08 -07:00
Karl Stolley
59788f01d4 markdown: Apply correct color var to RTL blockquotes. 2025-05-13 15:15:59 -07:00
Karl Stolley
a82921f32c markdown: Experiment with custom bullets, counters. 2025-05-12 18:08:28 -07:00
Karl Stolley
a576ae9fb8 markdown: Restyle block quotes to spec. 2025-05-12 18:08:28 -07:00
Karl Stolley
8419bc3fb8 markdown: Offset list items from markers to spec. 2025-05-12 18:08:28 -07:00
Karl Stolley
054f34a2b5 markdown: Align bullets left, centered with counters. 2025-05-12 18:08:28 -07:00
Karl Stolley
ebb5383fc9 markdown: Align counters flush left. 2025-05-12 18:08:28 -07:00
Karl Stolley
2ae2589494 thumbnails: Constrain thumbnails to 10em height only. 2025-05-06 13:16:00 -07:00
Karl Stolley
142d1958a0 url_previews: Post-process embed links for performant CSS. 2025-04-28 16:10:13 -07:00
Karl Stolley
80f101016e url_previews: Clamp title, description to two lines.
This also increases the size of the preview area's
height to accomodate two lines of both title and
description at a +2 line-height setting.
2025-04-28 16:10:13 -07:00
Karl Stolley
1184905a6b url_previews: Remove basically invisible text-shadow. 2025-04-28 16:10:13 -07:00
Karl Stolley
41968e2871 url_previews: Use em for title offset.
Removing `line-height` here also allows for the title
to assume the app-wide user-selected line height.
2025-04-25 11:52:12 -07:00
Karl Stolley
05e4a2f6ac url_previews: Rewrite message embeds in CSS Grid. 2025-04-25 11:52:12 -07:00
Karl Stolley
a7996c1bd6 thumbnails: Remove right-to-left rules obviated by flexbox. 2025-04-23 10:53:05 -07:00
Karl Stolley
bcddd71cca thumbnails: Add minimal flexbox definition. 2025-04-23 10:53:05 -07:00
Karl Stolley
ab24eea83e thumbnails: Place play button on all media with grid. 2025-04-10 12:55:15 -07:00
Karl Stolley
72c89404f3 thumbnails: Audition darker borders on typical images. 2025-04-10 12:55:15 -07:00
Karl Stolley
2421ddfb6e thumbnails: Audition thicker borders. 2025-04-10 12:55:15 -07:00
Karl Stolley
9392a1c8a6 cleanup: Move thumbnail values to CSS variables. 2025-04-10 12:55:15 -07:00
Karl Stolley
356028729f thumbnails: Handle dinky thumbnail images.
Fixes: #31502
2025-04-10 12:55:15 -07:00
Karl Stolley
d9f0fe882d thumbnails: Restore legacy values on video thumbnails. 2025-04-10 12:55:15 -07:00
Karl Stolley
61e8aef597 thumbnails: Style for portrait or landscape orientation. 2025-04-10 12:55:15 -07:00
Karl Stolley
4e19e82f64 thumbnails: Reference media anchors, images, and video by class. 2025-04-10 12:55:15 -07:00
Karl Stolley
1dc87be1db thumbnails: Remove unnecessary margin on media first-children.
This was made unnecessary by a patch submitted and merged
in #34271.
2025-04-10 12:55:15 -07:00
Karl Stolley
46b33f0d26 message_row: Better target first children. 2025-04-02 09:43:58 -07:00
Karl Stolley
465971171d rendered_markdown: Adjust content blocks for link focus ring. 2025-04-01 17:47:06 -07:00
apoorvapendse
353f57e518 copy: Style KaTeX annotations to be included in copy HTML.
We've for a while been finding that copy/paste of LaTeX only worked if
we had a more JS-heavy copy handler that directly copies the HTML/text
using events, rather than just allowing the browser's native copying
logic to do its thing.

We've discovered the bug was that the `<annotation>` tag in MathML is
not rendered in some browsers which results in default copy behavior
of the browser breaking KaTeX copy-pasting and quoting by omitting the
`<annotation>` in the copied HTML as Chrome and possibly other
browsers select only what is visible.

From https://www.w3.org/TR/selection-api/

> Chrome 16 dev behaves as you'd expect given its Selection
implementation. It refuses to select anything that's not visible, so
it's almost always wrong. Opera 11.50 just does nothing in all my
tests, as usual.

This can be observed in the `paste_html` fixtures present in
https://github.com/zulip/zulip/pull/33993#issuecomment-2725417637.

We fix this by simply overriding the `display:none` property from the
<annotation> tag in the user agent stylesheet, which lets the browser
select and ultimately copy it which results in the annotation being
present in the `paste_html` and restore the working of KaTeX
quoting/copy-pasting.

This appears to have no visible impact, since browsers don't actually
have a way to display the annotations.
2025-03-19 10:07:32 -07:00
Karl Stolley
4454811191 message_view: Better tolerate different opening Markdown elements. 2025-03-13 14:42:14 -07:00
Karl Stolley
a2892e713c rendered_markdown: Scale code-span padding with font size. 2025-03-12 10:21:15 -07:00