cuny-academic-commons / cbox-theme

Default theme for Commons In A Box
GNU General Public License v2.0
20 stars 15 forks source link

Commons 1.0.6 and Slider Image Scaling #174

Open vothsco opened 10 years ago

vothsco commented 10 years ago

Several members have noticed that image scaling behaves quite differently on the site since the upgrade to the slider functionality. Smaller images don't scale up like they used to. Here is a link to the thread: http://commonsinabox.org/groups/help-support/forum/topic/slider-and-slider-related-issues/page/3/#post-3970 Not sure if this is a bug, or maybe a request for enhancement. Please see Helene Findori's post on November 18 noting how the new version is less forgiving of different size sliders.

boonebgorges commented 10 years ago

I've been looking at the code here, and the short-term fix looks like it's as easy as setting the adaptiveHeight flag on the bxSlider init method to false: https://github.com/cuny-academic-commons/cbox-theme/blob/master/engine/includes/feature-slider/setup.php#L205

This change prevents the flex-slider wrapper itself from changing height, so that the page layout doesn't get screwed up.

It does not reintroduce image-stretching, but personally I think that auto-stretching images is pretty much guaranteed to look bad. What could perhaps be changed is that the caption overlay could be pinned to the bottom of the slider container. I can make this happen in the inspector by setting

.slides li {
    min-height: 344px;
}

where 344px is the desired container height. This doesn't seem like quite the right solution - should probably use a percentage, and make sure the parent element has a height.

@bowe @r-a-y What do you think?

On 11/18/2013 06:07 PM, vothsco wrote:

Several members have noticed that image scaling behaves quite differently on the site since the upgrade to the slider functionality. Smaller images don't scale up like they used to. Here is a link to the thread: http://commonsinabox.org/groups/help-support/forum/topic/slider-and-slider-related-issues/page/3/#post-3970 Not sure if this is a bug, or maybe a request for enhancement. Please see Helene Findori's post on November 18 noting how the new version is less forgiving of different size sliders.

— Reply to this email directly or view it on GitHub https://github.com/cuny-academic-commons/cbox-theme/issues/174.