From 67d47bfc4f8c74d88bc150496a8cc0546f10eda1 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 2 Apr 2014 14:56:37 -0500 Subject: [PATCH] the search results tend to pad themselves with their fixed height; remove the extra padding when there are results --- app/assets/javascripts/outfits/edit.js | 2 +- app/assets/stylesheets/outfits/_edit.sass | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/outfits/edit.js b/app/assets/javascripts/outfits/edit.js index 4e40f279..2e54ea10 100644 --- a/app/assets/javascripts/outfits/edit.js +++ b/app/assets/javascripts/outfits/edit.js @@ -1155,7 +1155,7 @@ View.Search = function (wardrobe) { } else { help_el.show(); } - form.toggleClass('has-results', items.length > 0); + wrapper.toggleClass('has-results', items.length > 0); fit(); }); diff --git a/app/assets/stylesheets/outfits/_edit.sass b/app/assets/stylesheets/outfits/_edit.sass index 42691306..60bfc7c2 100644 --- a/app/assets/stylesheets/outfits/_edit.sass +++ b/app/assets/stylesheets/outfits/_edit.sass @@ -351,12 +351,13 @@ body.outfits-edit #preview-search bottom: 1.5em left: 0 - margin-top: .5em - margin-bottom: 1em overflow: auto - padding: .5em 1em + padding: 1em 2em position: absolute width: 100% + + &.has-results + padding-bottom: 0 #footer bottom: 0 left: 0