mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-12 15:01:38 +03:00
chat-js: only show scrollbars if overflow
Uses overflow: auto on the code attachments so that scrollbars only appear if the content overflows the container. Adds borders on sent Hoon code to improve visual seperation.
This commit is contained in:
parent
3196179fbd
commit
a7253d4480
@ -71,7 +71,7 @@ h2 {
|
||||
}
|
||||
|
||||
.clamp-attachment {
|
||||
overflow: scroll;
|
||||
overflow: auto;
|
||||
max-height: 10em;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
@ -65,17 +65,17 @@ export class Message extends Component {
|
||||
(!!letter.code.output &&
|
||||
letter.code.output.length && letter.code.output.length > 0) ?
|
||||
(
|
||||
<pre className="f7 clamp-attachment pa1 mt0 mb0">
|
||||
<pre className="f7 clamp-attachment pa1 mt0 mb0 b--gray4 b--gray1-d bl br bb">
|
||||
{letter.code.output[0].join('\n')}
|
||||
</pre>
|
||||
) : null;
|
||||
return (
|
||||
<span>
|
||||
<pre className="f7 clamp-attachment pa1 mt0 mb0 bg-light-gray">
|
||||
<div className="mv2">
|
||||
<pre className="f7 clamp-attachment pa1 mt0 mb0 bg-light-gray b--gray4 b--gray1-d ba">
|
||||
{letter.code.expression}
|
||||
</pre>
|
||||
{outputElement}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
} else if ('url' in letter) {
|
||||
let imgMatch =
|
||||
|
Loading…
Reference in New Issue
Block a user