@import (reference) "../defs.less";
@import (reference) "djblets/css/mixins/markdown.less";


/****************************************************************************
 * Rich text
 ****************************************************************************/

.rich-text {
  margin: 0;
  padding: 0;

  .markdown-wysiwyg();

  .emoji {
    width: auto;
    height: 1rem;
    vertical-align: text-top;
  }
}

@import (reference) "../defs.less";
@import (reference) "djblets/css/mixins/markdown.less";


/****************************************************************************
 * Rich text
 ****************************************************************************/

.rich-text {
  margin: 0;
  padding: 0;

  .markdown-wysiwyg();

  img {
    max-width: 100%;
    height: auto;
  }

  .emoji {
    width: auto;
    height: 1rem;
    vertical-align: text-top;
  }
}

Fix image sizes in Markdown content.
Fix image sizes in Markdown content.

Overly-large images would overflow the rendered Markdown field, and this
was easy to have happen when dropping in high-DPI screenshots into a
text field. We now cap the width to the container width, preserving the
aspect ratio, so that it appears correct.

Testing Done:
Tested with some large images. Saw that they no longer overflowed.

Reviewed at https://reviews.reviewboard.org/r/10542/
