From eb35f260c6199c6598a89109357f139347fef89f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 4 Mar 2015 13:49:59 +0000 Subject: [PATCH] FIX: Corrected padding on non-sortable columns. span.non-sortable in the GridField header relies on there being other, sortable columns in the list to get the padding right. If there are no such columns (e.g. in a simple header), then the header is shown without padding, which is ugly. This small change fixes that. Tested on Chrome and Firefox. 1px smaller than a sortable header on Firefox but still looks fine. --- css/GridField.css | 2 +- scss/GridField.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/css/GridField.css b/css/GridField.css index cca02d398..1da9ca33e 100644 --- a/css/GridField.css +++ b/css/GridField.css @@ -113,7 +113,7 @@ Used in side panels and action tabs .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:-ms-input-placeholder { font-style: italic; color: #ced5d7; } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:placeholder { font-style: italic; color: #ced5d7; } .cms table.ss-gridfield-table tr th input.ss-gridfield-sort:focus { -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } -.cms table.ss-gridfield-table tr th span.non-sortable { display: block; } +.cms table.ss-gridfield-table tr th span.non-sortable { display: block; padding: 6px 8px; } .cms table.ss-gridfield-table tr td { border-right: 1px solid rgba(0, 0, 0, 0.1); padding: 8px 8px; color: #666; } .cms table.ss-gridfield-table tr td.bottom-all { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzk4YWFiNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #98aab6)); background-image: -moz-linear-gradient(#b0bec7, #98aab6); background-image: -webkit-linear-gradient(#b0bec7, #98aab6); background-image: linear-gradient(#b0bec7, #98aab6); padding: 4px 12px; } .cms table.ss-gridfield-table tr td.bottom-all .datagrid-footer-message { text-align: center; padding-top: 6px; color: white; } diff --git a/scss/GridField.scss b/scss/GridField.scss index e7710c021..3d4eb44ee 100644 --- a/scss/GridField.scss +++ b/scss/GridField.scss @@ -580,6 +580,7 @@ $gf_grid_x: 16px; span.non-sortable { display:block; + padding: 6px 8px; } }