From c49778be29138c4e8da928673f3d9cf300016859 2014-07-28 19:41:58 From: Matthias BUSSONNIER Date: 2014-07-28 19:41:58 Subject: [PATCH] Transfer of border-box-sizing from js to css `border-box-sizing` is pure styling, it has nothing to do in Javascript it should be put in css to be overwritable. --- diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index a40be91..0240262 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -123,7 +123,7 @@ define([ CodeCell.prototype.create_element = function () { Cell.prototype.create_element.apply(this, arguments); - var cell = $('
').addClass('cell border-box-sizing code_cell'); + var cell = $('
').addClass('cell code_cell'); cell.attr('tabindex','2'); var input = $('
').addClass('input'); diff --git a/IPython/html/static/notebook/js/textcell.js b/IPython/html/static/notebook/js/textcell.js index b99455d..22db8a4 100644 --- a/IPython/html/static/notebook/js/textcell.js +++ b/IPython/html/static/notebook/js/textcell.js @@ -70,7 +70,7 @@ define([ TextCell.prototype.create_element = function () { Cell.prototype.create_element.apply(this, arguments); - var cell = $("
").addClass('cell text_cell border-box-sizing'); + var cell = $("
").addClass('cell text_cell'); cell.attr('tabindex','2'); var prompt = $('
').addClass('prompt input_prompt'); diff --git a/IPython/html/static/notebook/less/cell.less b/IPython/html/static/notebook/less/cell.less index 7984c10..8bf3f85 100644 --- a/IPython/html/static/notebook/less/cell.less +++ b/IPython/html/static/notebook/less/cell.less @@ -2,19 +2,18 @@ div.cell { border: 1px solid transparent; .vbox(); .corner-all(); + .border-box-sizing(); border-width: thin; border-style: solid; - + &.selected { border-color: @border_color; } - + &.edit_mode { border-color: green; } -} -div.cell { width: 100%; padding: 5px 5px 5px 0px; /* This acts as a spacer between cells, that is outside the border */