zulip/web/styles
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
..
portico styles: Remove obsolete ‘transition: none …’ workaround. 2025-03-04 15:30:11 -08:00
alerts.css alerts: Improve styles, behavior between app and portico. 2025-03-14 11:52:18 -07:00
app_components.css settings: Center save/discard buttons vertically. 2025-03-14 16:35:05 -07:00
app_variables.css search: Increase min width of search pill label. 2025-03-17 17:04:28 -07:00
banners.css banners: Scale with base font size. 2025-03-17 11:43:57 -07:00
buttons.css connection_error_banner: Hide loading indicator on hover. 2025-03-17 09:47:52 -07:00
color_picker.css app_variables: Rename “color” variables that are actually gradients. 2025-02-19 11:01:48 -08:00
components.css tippy: Remove default fixed font size. 2025-03-05 13:54:19 -08:00
compose.css compose: Revert send button color to that in 9.x. 2025-03-19 09:00:49 -07:00
dark_theme.css personal_menu: Support changing information density settings. 2025-03-10 16:07:37 -07:00
drafts.css drafts: Rename removed-drafts-message class. 2024-12-17 11:57:04 -08:00
image_upload_widget.css settings: Improve layout and appearance of Organization logo area. 2024-10-25 15:39:13 -07:00
inbox.css dropdowns: Correct columnar flex alignment in recents, inbox. 2025-03-10 09:22:41 -07:00
informational_overlays.css help modal: Remove small_hotkey style. 2024-09-03 20:52:16 -07:00
input_pill.css user_pill: Use variables for sizing and scale with font-size. 2025-03-17 16:56:15 -07:00
left_sidebar.css left_sidebar: Hide menu option for home view if all messages are read. 2025-03-10 13:08:39 -07:00
lightbox.css lightbox: Add query to hide media-description below 100px width. 2025-01-16 09:01:51 -08:00
message_edit_history.css css: Refactor theme colors for .message_edit_history_content. 2024-09-23 16:07:51 -07:00
message_header.css banner: Aligned the username icon for topic header. 2025-02-25 15:54:47 -08:00
message_row.css compose: Revert send button color to that in 9.x. 2025-03-19 09:00:49 -07:00
message_view_header.css navbar: Fix vertical shift of Inbox title on hover. 2025-03-06 12:56:33 -08:00
modal.css stream: Modify warning shown when archiving announcement stream. 2025-03-17 11:02:55 -07:00
popovers.css move_topic: Improve placeholder when topic is not mandatory. 2025-03-17 10:56:01 -07:00
print.css typing: Move the typing notifications to below the mark as read banner. 2024-06-18 14:30:19 -07:00
progress_bar.css stylelint: Enable stylelint-high-performance-animation. 2024-10-23 14:56:39 -07:00
pygments.css styles: Fix invalid CSS generated due to @extend misusage. 2024-09-18 15:33:28 -07:00
reactions.css emoji: Allow emoji space, including alt_code, to better scale. 2025-03-07 15:27:55 -08:00
recent_view.css recent_view: Enable avatars and overflow marker to scale. 2025-03-18 09:12:01 -07:00
rendered_markdown.css copy: Style KaTeX annotations to be included in copy HTML. 2025-03-19 10:07:32 -07:00
right_sidebar.css right_sidebar: Remove invite users icon at bottom of buddy list. 2025-03-10 09:47:00 -07:00
scheduled_messages.css css: Remove unused css for scheduled-messages-loading class. 2024-07-24 10:12:42 -07:00
search.css search: Increase min width of search pill label. 2025-03-17 17:04:28 -07:00
settings.css settings: Update bot icons to be vertically aligned. 2025-03-17 10:52:25 -07:00
subscriptions.css Subscriptions: Fix the left offset of the group name. 2025-03-17 14:08:12 -07:00
tooltips.css tooltips: Fix hotkey hints wrapping when next to longer tooltip labels. 2024-09-19 10:49:15 -07:00
typeahead.css typeahead: Fix alignment of user group icon. 2025-03-14 11:07:33 -07:00
typing_notifications.css typing: Move the typing notifications to below the mark as read banner. 2024-06-18 14:30:19 -07:00
user_circles.css user_circles: Show deactivated icon in sidebars, inbox, recents. 2025-02-24 18:18:16 -08:00
user_status.css user_status: Convert margin to padding for taller hover highlight. 2025-02-25 15:54:14 -08:00
widgets.css widget: Center error message and scale with font size. 2025-03-04 17:57:20 -08:00
zulip.css dropdown_container: Fix dropdown list focus outline clipping 2025-03-17 14:07:33 -07:00