-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Navis Slideshow expand-on-click styles, again. #1695
Conversation
…hows in image blocks Implements #1664 (comment)
Bug that appeared in testing: An image in a block that's aligned full will revert to single-column width when the gallery closes. <figure class="wp-block-image alignfull"><img src="http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-1170x780.jpg" alt="Two genders do the bopping" class="wp-image-129823" srcset="http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-1170x780.jpg 1170w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-336x224.jpg 336w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-768x512.jpg 768w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-771x514.jpg 771w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h.jpg 1600w" sizes="(max-width: 1170px) 100vw, 1170px"><figcaption>This is a full-width image. It should be preceded by a single paragraph tag.</figcaption></figure> <figure class="wp-block-image alignfull navis-slideshow navis-single navis-full" style="max-width: 100%;"><span class="navis-before">X</span><img src="http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-1170x780.jpg" alt="Two genders do the bopping" class="wp-image-129823" srcset="http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-1170x780.jpg 1170w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-336x224.jpg 336w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-768x512.jpg 768w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-771x514.jpg 771w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h.jpg 1600w"><figcaption>This is a full-width image. It should be preceded by a single paragraph tag.</figcaption></figure> <figure class="wp-block-image alignfull" style="max-width: 100%;"><img src="http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-1170x780.jpg" alt="Two genders do the bopping" class="wp-image-129823" srcset="http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-1170x780.jpg 1170w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-336x224.jpg 336w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-768x512.jpg 768w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h-771x514.jpg 771w, http://mstoday.test/wp-content/uploads/2018/02/24496652921_1108fff3b7_h.jpg 1600w" sizes="(max-width: 1170px) 100vw, 1170px"><figcaption>This is a full-width image. It should be preceded by a single paragraph tag.</figcaption></figure> This appears to be because But I'm not sure why the |
The
which based on the docs in https://api.jquery.com/attr/#attr2, appears to be undefined behavior when
|
@joshdarby this is ready for review |
Are we worried that the user can scroll the page when the popup is open, and can thereby trigger the sticky nav to appear, covering the slideshow's close button? |
@benlk I'd think we'd probably want to disable scrolling when the popup is triggered. That might also help with our other issues of overlapping menus and whatnot. |
… Gallery blocks not having correct zoom of images
Current to-do list:
|
@benlk One more issue with this that I noticed is that if you have an image expanded and start to resize the window, the sticky nav pops up again. Maybe we should add a check to it to not display if any |
Or we should change the hide/show functions in this JS to hide a parent of the sticky nav element that's currently being shown/hidden. |
Regarding the gallery image cropping, this isn't a JS fix; it's a CSS fix for this monstrosity of a default style: .wp-block-gallery.is-cropped .blocks-gallery-image a,
.wp-block-gallery.is-cropped .blocks-gallery-image img,
.wp-block-gallery.is-cropped .blocks-gallery-item a,
.wp-block-gallery.is-cropped .blocks-gallery-item img {
height: 100%;
flex: 1;
-o-object-fit: cover;
object-fit: cover;
} The 100% height I'm not sure we should change, but looking at object-fit we could use object-fit doesn't work in IE though, which is probably why the 100% height. |
Nope, this is not just a contrast issue.
|
@benlk Yes, I did click on one of the light gray images but I don't believe it's a contrast issue. If you click on one of the light gray images above in the I also tried replacing one of the images with a darker image and it still showed a white screen with no exit. |
…sizing window Fixes #1695 (comment)
@benlk I think it's the |
The transform problem here is another instance of #1685, which means that we need a general solution for this. Which should be doable. |
…for light images that nearly match the window aspect ratio
…that are aligned full
Hmm, the change in 4ddfab0 doesn't seem to have taken when I deployed that to staging.
|
…s for various slides and Gutenberg assets
Note: When pushing LESS changes, remember to go to Dashboard > Appearance > CSS Variables and click "Save Variables". |
Changes
Testing to be completed pre-merge: