<NME> outputs.tsx
<BEF> import * as React from "react";

import styled, { StyledComponent } from "styled-components";

interface OutputsProps {
  className?: string;
  children?: React.ReactNode;
  /**
   * Whether or not to collapse the children of the component.
   */
  expanded?: boolean;
  /**
   * Whether or not to show the children of the component.
   */
  hidden?: boolean;
}

interface OutputWrapperProps {
  expanded?: boolean;
}

const OutputWrapper = styled.div.attrs<OutputWrapperProps>((props) => ({
  style: {
    maxHeight: props.expanded ? "100%" : null,
  },
}))`
  padding: 10px 10px 10px 10px;
  word-wrap: break-word;
  overflow-y: hidden;
  outline: none;
  text-overflow: ellipsis;

  &:empty {
    display: none;
  }

  /* NOTE: All these styles should get moved into some sort of
           "Default Output Style" that an output type can opt in to,
           like with HTML, Markdown, VDOM
           */
  & a {
    color: var(--link-color-unvisited, blue);
  }

  & a:visited {
    color: var(--link-color-visited, blue);
  }
  }

  & code {
    font-family: "Source Code Pro";
    white-space: pre-wrap;
    font-size: 14px;
  }
  & pre {
    white-space: pre-wrap;
    font-size: 14px;
    word-wrap: break-word;
  }

  & img {
    display: block;
    max-width: 100%;
  }

  & kbd {
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.1em 0.5em;
    margin: 0 0.2em;
    box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
    background-color: #f7f7f7;
  }

  & table {
    border-collapse: collapse;
  }

  & th,
  & td,
  /* for legacy output handling */
  & .th,
  & .td {
    padding: 0.5em 1em;
    border: 1px solid var(--theme-app-border, #cbcbcb);
  }

  & th {
    text-align: left;
  }

  & blockquote {
    padding: 0.75em 0.5em 0.75em 1em;
    background: var(--theme-cell-output-bg, white);
    border-left: 0.5em solid #ddd;
  }

  & blockquote::before {
    display: block;
    height: 0;
    content: "“";
    margin-left: -0.95em;
    font: italic 400%/1 Open Serif, Georgia, "Times New Roman", serif;
    color: solid var(--theme-app-border, #cbcbcb);
  }

  /* for nested paragraphs in block quotes */
  & blockquote p {
    display: inline;
  }

  & dd {
    display: block;
    -webkit-margin-start: 40px;
  }
  & dl {
    display: block;
    -webkit-margin-before: 1__qem;
    -webkit-margin-after: 1em;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
  }

  & dt {
    display: block;
  }

  & dl {
    width: 100%;
    overflow: hidden;
    padding: 0;
    margin: 0;
  }

  & dt {
    font-weight: bold;
    float: left;
    width: 20%;
    /* adjust the width; make sure the total of both is 100% */
    padding: 0;
    margin: 0;
  }

  & dd {
    float: left;
    width: 80%;
    /* adjust the width; make sure the total of both is 100% */
    padding: 0;
    margin: 0;
  }

  /** Adaptation for the R kernel's inline lists **/
  & .list-inline li {
    display: inline;
    padding-right: 20px;
    text-align: center;
  }
` as StyledComponent<"div", any, OutputWrapperProps, never>;

export class Outputs extends React.PureComponent<OutputsProps> {
  static defaultProps = {
    children: null,
    className: "nteract-outputs",
    hidden: false,
    expanded: false,
  };

  render() {
    if (this.props.hidden) {
      return null;
    }

    if (this.props.children) {
      return (
        <OutputWrapper
          expanded={this.props.expanded}
          className={this.props.className}
        >
          {this.props.children}
        </OutputWrapper>
      );
    }

    return null;
  }
}

export default Outputs;

<MSG> Merge pull request #4504 from nteract/safia/fix-output-backup-font

Set monospace default font for outputs
<DFF> @@ -48,7 +48,7 @@ const OutputWrapper = styled.div.attrs<OutputWrapperProps>(props => ({
   }
 
   & code {
-    font-family: "Source Code Pro";
+    font-family: "Source Code Pro", monospace;
     white-space: pre-wrap;
     font-size: 14px;
   }

{'commit': 'diff --git a/packages/presentational-components/src/components/outputs.tsx b/packages/presentational-components/src/components/outputs.tsx\nindex 5d4099673..702e604dd 100644\n--- a/packages/presentational-components/src/components/outputs.tsx\n+++ b/packages/presentational-components/src/components/outputs.tsx\n@@ -48,7 +48,7 @@ const OutputWrapper = styled.div.attrs<OutputWrapperProps>(props => ({\n   }\n \n   & code {\n-    font-family: "Source Code Pro";\n+    font-family: "Source Code Pro", monospace;\n     white-space: pre-wrap;\n     font-size: 14px;\n   }\n', 'commit_subject': 'Merge pull request #4504 from nteract/safia/fix-output-backup-font', 'repo_name': 'nteract/nteract', 'committer': {'name': 'GitHub', 'email': '1505422b2465e9a84f6fdfaa161078890c593f06@github.com', 'time_sec': '1564979518', 'tz_offset': '-420', 'date': {'seconds': '1564979518'}}, 'commit_tree': 'ae12960b7799ac4aab366674808a5b108b5a845b', 'commit_message': 'Merge pull request #4504 from nteract/safia/fix-output-backup-font\n\nSet monospace default font for outputs', 'language_name': 'JavaScript', 'license': 'bsd-3-clause', 'hunks': '@@ -48,7 +48,7 @@ const OutputWrapper = styled.div.attrs<OutputWrapperProps>(props => ({\n   }\n \n   & code {\n-    font-family: "Source Code Pro";\n+    font-family: "Source Code Pro", monospace;\n     white-space: pre-wrap;\n     font-size: 14px;\n   }\n', 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/packages/presentational-components/src/components/outputs.tsx', 'tgt_file': 'b/packages/presentational-components/src/components/outputs.tsx', 'file_extension': '.tsx', 'before_file': 'import * as React from "react";\n\nimport styled, { StyledComponent } from "styled-components";\n\ninterface OutputsProps {\n  className?: string;\n  children?: React.ReactNode;\n  /**\n   * Whether or not to collapse the children of the component.\n   */\n  expanded?: boolean;\n  /**\n   * Whether or not to show the children of the component.\n   */\n  hidden?: boolean;\n}\n\ninterface OutputWrapperProps {\n  expanded?: boolean;\n}\n\nconst OutputWrapper = styled.div.attrs<OutputWrapperProps>((props) => ({\n  style: {\n    maxHeight: props.expanded ? "100%" : null,\n  },\n}))`\n  padding: 10px 10px 10px 10px;\n  word-wrap: break-word;\n  overflow-y: hidden;\n  outline: none;\n  text-overflow: ellipsis;\n\n  &:empty {\n    display: none;\n  }\n\n  /* NOTE: All these styles should get moved into some sort of\n           "Default Output Style" that an output type can opt in to,\n           like with HTML, Markdown, VDOM\n           */\n  & a {\n    color: var(--link-color-unvisited, blue);\n  }\n\n  & a:visited {\n    color: var(--link-color-visited, blue);\n  }\n  }\n\n  & code {\n    font-family: "Source Code Pro";\n    white-space: pre-wrap;\n    font-size: 14px;\n  }\n  & pre {\n    white-space: pre-wrap;\n    font-size: 14px;\n    word-wrap: break-word;\n  }\n\n  & img {\n    display: block;\n    max-width: 100%;\n  }\n\n  & kbd {\n    display: inline-block;\n    border: 1px solid #ccc;\n    border-radius: 4px;\n    padding: 0.1em 0.5em;\n    margin: 0 0.2em;\n    box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;\n    background-color: #f7f7f7;\n  }\n\n  & table {\n    border-collapse: collapse;\n  }\n\n  & th,\n  & td,\n  /* for legacy output handling */\n  & .th,\n  & .td {\n    padding: 0.5em 1em;\n    border: 1px solid var(--theme-app-border, #cbcbcb);\n  }\n\n  & th {\n    text-align: left;\n  }\n\n  & blockquote {\n    padding: 0.75em 0.5em 0.75em 1em;\n    background: var(--theme-cell-output-bg, white);\n    border-left: 0.5em solid #ddd;\n  }\n\n  & blockquote::before {\n    display: block;\n    height: 0;\n    content: "“";\n    margin-left: -0.95em;\n    font: italic 400%/1 Open Serif, Georgia, "Times New Roman", serif;\n    color: solid var(--theme-app-border, #cbcbcb);\n  }\n\n  /* for nested paragraphs in block quotes */\n  & blockquote p {\n    display: inline;\n  }\n\n  & dd {\n    display: block;\n    -webkit-margin-start: 40px;\n  }\n  & dl {\n    display: block;\n    -webkit-margin-before: 1__qem;\n    -webkit-margin-after: 1em;\n    -webkit-margin-start: 0;\n    -webkit-margin-end: 0;\n  }\n\n  & dt {\n    display: block;\n  }\n\n  & dl {\n    width: 100%;\n    overflow: hidden;\n    padding: 0;\n    margin: 0;\n  }\n\n  & dt {\n    font-weight: bold;\n    float: left;\n    width: 20%;\n    /* adjust the width; make sure the total of both is 100% */\n    padding: 0;\n    margin: 0;\n  }\n\n  & dd {\n    float: left;\n    width: 80%;\n    /* adjust the width; make sure the total of both is 100% */\n    padding: 0;\n    margin: 0;\n  }\n\n  /** Adaptation for the R kernel\'s inline lists **/\n  & .list-inline li {\n    display: inline;\n    padding-right: 20px;\n    text-align: center;\n  }\n` as StyledComponent<"div", any, OutputWrapperProps, never>;\n\nexport class Outputs extends React.PureComponent<OutputsProps> {\n  static defaultProps = {\n    children: null,\n    className: "nteract-outputs",\n    hidden: false,\n    expanded: false,\n  };\n\n  render() {\n    if (this.props.hidden) {\n      return null;\n    }\n\n    if (this.props.children) {\n      return (\n        <OutputWrapper\n          expanded={this.props.expanded}\n          className={this.props.className}\n        >\n          {this.props.children}\n        </OutputWrapper>\n      );\n    }\n\n    return null;\n  }\n}\n\nexport default Outputs;\n', 'message': 'Merge pull request #4504 from nteract/safia/fix-output-backup-font\n\nSet monospace default font for outputs', 'author_name': 'GitHub', 'lang': 'tsx'}