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:
Karl Stolley 2024-07-30 10:49:21 -05:00 committed by Tim Abbott
parent cc1cfa9336
commit 887e7e1e13
3 changed files with 3 additions and 22 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;