From e80633da2976ae3fdb4caab8cce8ea27da5f5412 2014-02-07 23:08:35 From: MinRK Date: 2014-02-07 23:08:35 Subject: [PATCH] set overflow-x: hidden on Firefox only workaround crazy Firefox-only behavior when selecting newlines closes #3549 Conflicts: IPython/html/static/style/style.min.css --- diff --git a/IPython/html/static/notebook/less/codemirror.less b/IPython/html/static/notebook/less/codemirror.less index fa9759c..2bb06af 100644 --- a/IPython/html/static/notebook/less/codemirror.less +++ b/IPython/html/static/notebook/less/codemirror.less @@ -22,6 +22,14 @@ overflow-x: auto; } +@-moz-document { + /* Firefox does weird and terrible things (#3549) when overflow-x is auto */ + /* It doesn't respect the overflow setting anyway, so we can workaround it with this */ + .CodeMirror-scroll { + overflow-x: hidden; + } +} + .CodeMirror-lines { /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */ /* we have set a different line-height and want this to scale with that. */ diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 0affb0c..9ec8c48 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -1355,6 +1355,7 @@ div.input{page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizon div.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7} div.input_prompt{color:#000080;border-top:1px solid transparent} .CodeMirror{line-height:1.231em;height:auto;background:none;} +<<<<<<< HEAD .CodeMirror-scroll{overflow-y:hidden;overflow-x:auto} .CodeMirror-lines{padding:.4em} .CodeMirror-linenumber{padding:0 8px 0 4px} @@ -1394,6 +1395,59 @@ div.output_area .rendered_html img{margin-left:0;margin-right:0} div.output_area pre{font-family:monospace;margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;color:#000;background-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;line-height:inherit} div.output_subarea{padding:.4em .4em 0 .4em;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;flex:1} div.output_text{text-align:left;color:#000;font-family:monospace;line-height:1.231em} +======= +.CodeMirror-scroll{overflow-y:hidden;overflow-x:auto;} +@-moz-document {.CodeMirror-scroll{overflow-x:hidden;}}.CodeMirror-lines{padding:0.4em;} +.CodeMirror-linenumber{padding:0 8px 0 4px;} +.CodeMirror-gutters{border-bottom-left-radius:4px;border-top-left-radius:4px;} +.CodeMirror pre{padding:0;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.completions{position:absolute;z-index:10;overflow:hidden;border:1px solid #ababab;border-radius:4px;-webkit-box-shadow:0px 6px 10px -1px #adadad;-moz-box-shadow:0px 6px 10px -1px #adadad;box-shadow:0px 6px 10px -1px #adadad;} +.completions select{background:white;outline:none;border:none;padding:0px;margin:0px;overflow:auto;font-family:monospace;font-size:110%;color:#000000;} +.completions select option.context{color:#0064cd;} +pre code{display:block;padding:0.5em;} +.highlight-base,pre code,pre .subst,pre .tag .title,pre .lisp .title,pre .clojure .built_in,pre .nginx .title{color:black;} +.highlight-string,pre .string,pre .constant,pre .parent,pre .tag .value,pre .rules .value,pre .rules .value .number,pre .preprocessor,pre .ruby .symbol,pre .ruby .symbol .string,pre .aggregate,pre .template_tag,pre .django .variable,pre .smalltalk .class,pre .addition,pre .flow,pre .stream,pre .bash .variable,pre .apache .tag,pre .apache .cbracket,pre .tex .command,pre .tex .special,pre .erlang_repl .function_or_atom,pre .markdown .header{color:#BA2121;} +.highlight-comment,pre .comment,pre .annotation,pre .template_comment,pre .diff .header,pre .chunk,pre .markdown .blockquote{color:#408080;font-style:italic;} +.highlight-number,pre .number,pre .date,pre .regexp,pre .literal,pre .smalltalk .symbol,pre .smalltalk .char,pre .go .constant,pre .change,pre .markdown .bullet,pre .markdown .link_url{color:#080;} +pre .label,pre .javadoc,pre .ruby .string,pre .decorator,pre .filter .argument,pre .localvars,pre .array,pre .attr_selector,pre .important,pre .pseudo,pre .pi,pre .doctype,pre .deletion,pre .envvar,pre .shebang,pre .apache .sqbracket,pre .nginx .built_in,pre .tex .formula,pre .erlang_repl .reserved,pre .prompt,pre .markdown .link_label,pre .vhdl .attribute,pre .clojure .attribute,pre .coffeescript .property{color:#8888ff;} +.highlight-keyword,pre .keyword,pre .id,pre .phpdoc,pre .aggregate,pre .css .tag,pre .javadoctag,pre .phpdoc,pre .yardoctag,pre .smalltalk .class,pre .winutils,pre .bash .variable,pre .apache .tag,pre .go .typename,pre .tex .command,pre .markdown .strong,pre .request,pre .status{color:#008000;font-weight:bold;} +.highlight-builtin,pre .built_in{color:#008000;} +pre .markdown .emphasis{font-style:italic;} +pre .nginx .built_in{font-weight:normal;} +pre .coffeescript .javascript,pre .javascript .xml,pre .tex .formula,pre .xml .javascript,pre .xml .vbscript,pre .xml .css,pre .xml .cdata{opacity:0.5;} +.cm-s-ipython span.cm-variable{color:black;} +.cm-s-ipython span.cm-keyword{color:#008000;font-weight:bold;} +.cm-s-ipython span.cm-number{color:#080;} +.cm-s-ipython span.cm-comment{color:#408080;font-style:italic;} +.cm-s-ipython span.cm-string{color:#BA2121;} +.cm-s-ipython span.cm-builtin{color:#008000;} +.cm-s-ipython span.cm-error{color:#f00;} +.cm-s-ipython span.cm-operator{color:#AA22FF;font-weight:bold;} +.cm-s-ipython span.cm-meta{color:#AA22FF;} +#menubar .navbar-inner{min-height:28px;border-top:1px;border-radius:0px 0px 4px 4px;} +#menubar .navbar{margin-bottom:8px;} +.nav-wrapper{border-bottom:1px solid #d4d4d4;} +#menubar li.dropdown{line-height:12px;} +body{background-color:#ffffff;} +body.notebook_app{overflow:hidden;} +span#notebook_name{height:1em;line-height:1em;padding:3px;border:none;font-size:146.5%;} +div#notebook_panel{margin:0px 0px 0px 0px;padding:0px;-webkit-box-shadow:0 -1px 10px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 -1px 10px rgba(0, 0, 0, 0.1);box-shadow:0 -1px 10px rgba(0, 0, 0, 0.1);} +div#notebook{overflow-y:scroll;overflow-x:auto;width:100%;padding:5px 5px 15px 5px;margin:0px;border-top:1px solid #ababab;} +div.ui-widget-content{border:1px solid #ababab;outline:none;} +pre.dialog{background-color:#f7f7f7;border:1px solid #ddd;border-radius:4px;padding:0.4em;padding-left:2em;} +p.dialog{padding:0.2em;} +pre,code,kbd,samp{white-space:pre-wrap;} +#fonttest{font-family:monospace;} +p{margin-bottom:0;} +.end_space{height:200px;} +#notification_area{z-index:10;} +.notification_widget{color:#777777;padding:1px 12px;margin:2px 4px;z-index:10;border:1px solid #ccc;border-radius:4px;background:rgba(240, 240, 240, 0.5);} +div.output_area{padding:0px;page-break-inside:avoid;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:box;box-orient:horizontal;box-align:stretch;} +div.output_area pre{font-family:monospace;margin:0;padding:0;border:0;font-size:100%;vertical-align:baseline;color:black;background-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;line-height:inherit;} +div.output_subarea{padding:0.44em 0.4em 0.4em 1px;margin-left:6px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;} +div.output_text{text-align:left;color:#000000;font-family:monospace;line-height:1.231em;} +div.output_stream{padding-top:0.0em;padding-bottom:0.0em;} +>>>>>>> b2821ef... set overflow-x: hidden on Firefox only div.output_stderr{background:#fdd;} div.output_latex{text-align:left} div.output_javascript:empty{padding:0}