Minimise memory requirements for rendered cells and rows in SlickGrid. Fixes #2035

- The CSS class 'slick-row' has been renamed to 'sr'

- The CSS class 'slick-cell' has been renamed to 'sc'

- The SQL Editor included an unused 'normal_row' class on each row which has been removed as it was unreferenced in the code or CSS.

The intent of these changes is to minimise memory usage by the grid, by saving a few bytes per row/cell.
It's questionable how much difference this actually makes given that SlickGrid updates the document so it
only includes the visible rows on the fly, but every little helps.
This commit is contained in:
Dave Page
2016-12-22 17:43:42 +00:00
parent 43b9e53572
commit 87d4937726
6 changed files with 46 additions and 37 deletions

View File

@@ -29,23 +29,23 @@ classes should alter those!
height: 100%;
}
.slick-row.ui-state-active {
.sr.ui-state-active {
background: #F5F7D7;
}
.slick-row {
.sr {
position: absolute;
background: white;
border: 0px;
line-height: 20px;
}
.slick-row.selected {
.sr.selected {
z-index: 10;
background: #DFE8F6;
}
.slick-cell {
.sc {
padding-left: 4px;
padding-right: 4px;
}
@@ -73,11 +73,11 @@ classes should alter those!
background: white;
}
.slick-cell.selected {
.sc.selected {
background-color: beige;
}
.slick-cell.active {
.sc.active {
border-color: gray;
border-style: solid;
}
@@ -86,20 +86,20 @@ classes should alter those!
background: silver !important;
}
.slick-row.odd {
.sr.odd {
background: #fafafa;
}
.slick-row.ui-state-active {
.sr.ui-state-active {
background: #F5F7D7;
}
.slick-row.loading {
.sr.loading {
opacity: 0.5;
filter: alpha(opacity = 50);
}
.slick-cell.invalid {
.sc.invalid {
border-color: red;
-moz-animation-duration: 0.2s;
-webkit-animation-duration: 0.2s;

View File

@@ -81,13 +81,13 @@ classes should alter those!
outline: 0;
}
.slick-row.ui-widget-content, .slick-row.ui-state-active {
.sr.ui-widget-content, .sr.ui-state-active {
position: absolute;
border: 0px;
width: 100%;
}
.slick-cell, .slick-headerrow-column {
.sc, .slick-headerrow-column {
position: absolute;
border: 1px solid transparent;
border-right: 1px dotted silver;
@@ -110,7 +110,7 @@ classes should alter those!
display: inline-block;
}
.slick-cell.highlighted {
.sc.highlighted {
background: lightskyblue;
background: rgba(0, 0, 255, 0.2);
-webkit-transition: all 0.5s;
@@ -119,11 +119,11 @@ classes should alter those!
transition: all 0.5s;
}
.slick-cell.flashing {
.sc.flashing {
border: 1px solid red !important;
}
.slick-cell.editable {
.sc.editable {
z-index: 11;
overflow: visible;
background: white;
@@ -131,7 +131,7 @@ classes should alter those!
border-style: solid;
}
.slick-cell:focus {
.sc:focus {
outline: none;
}