Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karuna: Gallery Widget being display at 30% of the size on the Full-Width Footer Area #34

Closed
liviopv opened this issue Mar 8, 2018 · 2 comments
Labels

Comments

@liviopv
Copy link

liviopv commented Mar 8, 2018

Steps to replicate

  1. Setup a Static Front Page
  2. Go to My Sites > Theme > Customize > Widgets > Full-Width Footer
  3. Add a Gallery Widget
  4. Select the layout as "Slideshow" and the size "Full size"
    5.Publish

Result

The gallery will show up at 30% of the expected size.

Screenshot: https://cldup.com/MxU0owmtfM.png

Expected

The gallery should fill all the space in the widget area:

Screenshot: https://cldup.com/PgNVwmhd-9.png

What I Found

Checking the CSS, I noticed that this is might be caused by the fact that the class being used in the CSS of the Gallery Widget .widget-gallery is different than the one referenced in the HTML widget_media_gallery.

I added the CSS below to the user's site as a workaround:

.widget_media_gallery {
	flex-basis: 100% !important;
}
  • User report: #1003740-zen
  • User's site: fincapiedra.org (already adjusted by the CSS above)
@liviopv liviopv added the [Type] Bug Something isn't working label Mar 8, 2018
@sixhours
Copy link
Contributor

sixhours commented Mar 8, 2018

There's a function that's supposed to address this in inc/jetpack.php:

/*
 * Adjust content width for Tiled Galleries when using the Header or Full-Width widget areas
 */
function karuna_jetpack_gallery_widget_width( $width ) {
	if ( is_active_sidebar( 'sidebar-5' ) || is_active_sidebar( 'sidebar-4' ) ) {
		$width = 1040;
	}

	return $width;
}
add_filter( 'gallery_widget_content_width', 'karuna_jetpack_gallery_widget_width' );

I wonder if something has changed on Jetpack's side.

@sixhours
Copy link
Contributor

sixhours commented Mar 8, 2018

I went back through Karuna's commit history, and I can't for the life of me figure out why I'd set a 30% width for widgets in the full-width header and footer areas. :-|

"Full width" implies that the content would take up the full width, but I added the 30% flex styles with the following commit message:

Full-Width Header widget area has a new title; better styles for widgets in the full-width widget areas if users add more than one widget.

Emphasis mine.

This has been in place since before the theme launched, though, so we can't change it now without disrupting existing customers. Using Custom CSS to adjust the width is the best solution; I'm going to wontfix it, but we should address this in a future version of Karuna.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants