From c125e1c7a8c83184cac469e147d8bdafdbf3bcd3 Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Tue, 5 Nov 2013 11:34:40 +0100 Subject: [PATCH] min-width instead of width for prompt mainly helpfull for nbviewer responsive css to have the prompt above the code cells, and have the correct width. --- IPython/html/static/notebook/less/cell.less | 2 +- IPython/html/static/style/ipython.min.css | 2 +- IPython/html/static/style/style.min.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/IPython/html/static/notebook/less/cell.less b/IPython/html/static/notebook/less/cell.less index 30d6719d4..2782ea724 100644 --- a/IPython/html/static/notebook/less/cell.less +++ b/IPython/html/static/notebook/less/cell.less @@ -15,7 +15,7 @@ div.cell { div.prompt { /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ - width: 11ex; + min-width: 11ex; /* This 0.4em is tuned to match the padding on the CodeMirror editor. */ padding: 0.4em; margin: 0px; diff --git a/IPython/html/static/style/ipython.min.css b/IPython/html/static/style/ipython.min.css index 75b72e29d..f4b44be87 100644 --- a/IPython/html/static/style/ipython.min.css +++ b/IPython/html/static/style/ipython.min.css @@ -55,7 +55,7 @@ input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-botto .ansibgcyan{background-color:cyan;} .ansibggray{background-color:gray;} div.cell{border:1px solid transparent;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;padding:5px 5px 5px 0px;margin:2px 0px 2px 7px;outline:none;}div.cell.selected{border-radius:4px;border:thin #ababab solid;} -div.prompt{width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} +div.prompt{min-width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} div.input{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.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7;} div.input_prompt{color:navy;border-top:1px solid transparent;} diff --git a/IPython/html/static/style/style.min.css b/IPython/html/static/style/style.min.css index 08bc47cbe..817ba7387 100644 --- a/IPython/html/static/style/style.min.css +++ b/IPython/html/static/style/style.min.css @@ -1436,7 +1436,7 @@ input.engine_num_input{height:20px;margin-bottom:2px;padding-top:0;padding-botto .ansibgcyan{background-color:cyan;} .ansibggray{background-color:gray;} div.cell{border:1px solid transparent;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;padding:5px 5px 5px 0px;margin:2px 0px 2px 7px;outline:none;}div.cell.selected{border-radius:4px;border:thin #ababab solid;} -div.prompt{width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} +div.prompt{min-width:11ex;padding:0.4em;margin:0px;font-family:monospace;text-align:right;line-height:1.231em;} div.input{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.input_area{border:1px solid #cfcfcf;border-radius:4px;background:#f7f7f7;} div.input_prompt{color:navy;border-top:1px solid transparent;}