message_row: Better target first children.

This commit is contained in:
Karl Stolley
2025-04-02 08:28:51 -04:00
committed by Tim Abbott
parent f145d5738e
commit 46b33f0d26
2 changed files with 13 additions and 13 deletions

View File

@@ -156,6 +156,16 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
/* For the sake of paragraphs and lists that include
links, we adjust the vertical space here to keep
it uniform. */
&:has(> p:first-child, > ol:first-child, > ul:first-child) {
padding-top: calc(
var(--message-box-markdown-aligned-vertical-space) -
var(--message-box-link-focus-ring-block-padding)
);
}
&:empty { &:empty {
display: none; display: none;
} }
@@ -381,16 +391,6 @@
grid-area: message; grid-area: message;
} }
/* For the sake of paragraphs and lists that include
links, we adjust the vertical space here to keep
it uniform. */
.message_content:has(p:first-child, ol:first-child, ul:first-child) {
padding-top: calc(
var(--message-box-markdown-aligned-vertical-space) -
var(--message-box-link-focus-ring-block-padding)
);
}
.slow-send-spinner { .slow-send-spinner {
align-self: center; align-self: center;
position: unset; position: unset;

View File

@@ -23,9 +23,9 @@
/* To avoid cutting off the focus ring on links, we set /* To avoid cutting off the focus ring on links, we set
padding on first children most likely to take links. padding on first children most likely to take links.
We account for this extra space on `.message_content`. */ We account for this extra space on `.message_content`. */
& p:first-child, & > p:first-child,
& ul:first-child, & > ul:first-child,
& ol:first-child { & > ol:first-child {
padding-top: var(--message-box-link-focus-ring-block-padding); padding-top: var(--message-box-link-focus-ring-block-padding);
} }