From fc08f4904dd5711b15bd3bb84568f7023c848477 Mon Sep 17 00:00:00 2001 From: "Jessica B. Hamrick" Date: Thu, 29 Oct 2015 11:02:52 -0700 Subject: [PATCH] Set less variables for border padding and width --- notebook/static/notebook/less/cell.less | 16 +++++++++------- notebook/static/notebook/less/variables.less | 4 +++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/notebook/static/notebook/less/cell.less b/notebook/static/notebook/less/cell.less index 9eae93ce2..85e0481ff 100644 --- a/notebook/static/notebook/less/cell.less +++ b/notebook/static/notebook/less/cell.less @@ -1,14 +1,16 @@ +@_cell_padding_minus_border: @cell_padding - @cell_border_width; + ._marked_style(@n) { border-left-width: @n; - padding-left: 6px-@n; + padding-left: @cell_padding - @n; } div.cell { - border: 1px solid transparent; + border: @cell_border_width solid transparent; .vbox(); .corner-all(); .border-box-sizing(); - border-width: thin; + border-width: @cell_border_width; border-style: solid; &.marked { @@ -46,7 +48,7 @@ div.cell { } width: 100%; - padding: 5px; + padding: @_cell_padding_minus_border; /* This acts as a spacer between cells, that is outside the border */ margin: 0px; outline: none; @@ -103,15 +105,15 @@ div.prompt:empty { div.unrecognized_cell { // from text_cell - padding: 5px 5px 5px 0px; + padding: 5px @_cell_padding_minus_border 5px 0px; .hbox(); .inner_cell { .border-radius(@border-radius-base); - padding: 5px; + padding: @_cell_padding_minus_border; font-weight: bold; color: red; - border: 1px solid @light_border_color; + border: @cell_border_width solid @light_border_color; background: darken(@cell_background, 5%); // remove decoration from link a { diff --git a/notebook/static/notebook/less/variables.less b/notebook/static/notebook/less/variables.less index 8827cce32..441395491 100644 --- a/notebook/static/notebook/less/variables.less +++ b/notebook/static/notebook/less/variables.less @@ -17,4 +17,6 @@ @notification_widget_bg: rgba(240, 240, 240, 0.5); @marked_border_color: #009AF5; @marked_border_color_light: #7AC7F5; -@edit_mode_border_color: green; \ No newline at end of file +@edit_mode_border_color: green; +@cell_padding: 6px; +@cell_border_width: 1px; \ No newline at end of file