mirror of https://github.com/zulip/zulip.git
rendered_markdown: Remove expensive :first-child and :last-child selectors.
With the refactoring of the rendered-Markdown area to use only margin bottom, including in message-edit previewsk, these expensive, general selectors are unnecessary. Headings and horizontal rules, which do have margin-top, are zeroed out elsewhere in the rendered-markdown file.
This commit is contained in:
parent
cc1cfa9336
commit
887e7e1e13
|
@ -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;
|
||||
|
|
|
@ -696,7 +696,7 @@
|
|||
border: none;
|
||||
/* Match textarea padding to compose box and
|
||||
message-edit preview area. */
|
||||
padding: 5px;
|
||||
padding: 5px 5px 0;
|
||||
margin: 0;
|
||||
|
||||
box-shadow: none;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue