Line up linked message in viewport

We anchor link to the relevant message in a thread. Which is good, but
it leaves the messages hard against the top edge of the viewport. This
looks sloppy. So this commit:

- makes each message focusable
- shifts the focused message with CSS to sit away from the viewport
This commit is contained in:
Chris Hill-Scott
2017-06-06 15:30:38 +01:00
parent f6d8e55579
commit e7ed1c1cfe
2 changed files with 11 additions and 1 deletions

View File

@@ -63,3 +63,13 @@ $tail-angle: 20deg;
.sms-message-status-outbound {
text-align: right;
}
.sms-message-row {
&:focus {
outline: none;
padding-top: 20px;
margin-top: -20px;
}
}

View File

@@ -14,7 +14,7 @@
</h1>
</div>
{% for message in conversation %}
<div class="grid-row" id="n{{ message.id }}">
<div class="grid-row sms-message-row" id="n{{ message.id }}" tabindex="0">
{% if message.inbound %}
<div class="column-two-thirds sms-message-inbound">
{{ message.content | string }}