Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
rendered_markdown: Remove expensive :first-child and :last-child selectors.
Karl Stolley887e7e1e13e7
diff --git a/web/styles/compose.css b/web/styles/compose.cssindex cc987a5cb80..d640265dd69 100644--- a/web/styles/compose.css+++ b/web/styles/compose.css@@ -826,7 +826,7 @@textarea.new_message_textarea {display: table-cell;- padding: 5px;+ padding: 5px 5px 0;height: 1.5em;max-height: 22em;margin: 0;@@ -1359,7 +1359,7 @@ textarea.new_message_textarea {}.preview_message_area {- padding: 5px;+ padding: 5px 5px 0;overflow: auto;border-radius: 3px 3px 0 0;diff --git a/web/styles/message_row.css b/web/styles/message_row.cssindex 9b808e0e261..8b4e1a19d88 100644--- a/web/styles/message_row.css+++ b/web/styles/message_row.css@@ -696,7 +696,7 @@border: none;/* Match textarea padding to compose box andmessage-edit preview area. */- padding: 5px;+ padding: 5px 5px 0;margin: 0;box-shadow: none;diff --git a/web/styles/rendered_markdown.css b/web/styles/rendered_markdown.cssindex 72e41c74335..08b195ae8ba 100644--- a/web/styles/rendered_markdown.css+++ b/web/styles/rendered_markdown.css@@ -349,13 +349,6 @@}}- & > .spoiler-block:last-child {- /* A spoiler block at the end of a message, or as- a message's only content, gets the same bottom- margin as other elements. */- margin-bottom: var(--markdown-interelement-space-px);- }-/* embedded link previews */.message_inline_image_title {font-weight: bold;@@ -897,18 +890,6 @@}}-.preview_content.rendered_markdown {- /* Ensure that the first child and last child- don't have blank area at the top and bottom respectively. */- & > :first-child {- margin-top: 0;- }-- & > :last-child:not(.message_inline_image) {- margin-bottom: 0;- }-}-.codehilite {display: block !important;border: none !important;