Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
miina committed May 28, 2018
1 parent f658c43 commit 6900e2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/css/amp-default.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ amp-fit-text h6 {
font-size: inherit;
}

#amp-image-lightbox-1 img {
#amp-image-lightbox .i-amphtml-image-lightbox-viewer-image {
object-fit: contain;
}

Expand Down
2 changes: 1 addition & 1 deletion includes/sanitizers/class-amp-base-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class AMP_Base_Sanitizer {
*
* @const string
*/
const AMP_IMAGE_LIGHTBOX_ID = 'amp-image-lightbox-1';
const AMP_IMAGE_LIGHTBOX_ID = 'amp-image-lightbox';

/**
* Placeholder for default args, to be set in child classes.
Expand Down
4 changes: 2 additions & 2 deletions tests/test-class-amp-gallery-block-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public function get_data() {

'data_amp_with_lightbox' => array(
'<ul data-amp-lightbox="true"><li class="blocks-gallery-item"><figure><a href="http://example.com"><amp-img src="http://example.com/img.png" width="600" height="400"></amp-img></a></figure></li></ul>',
'<ul data-amp-lightbox="true"><li class="blocks-gallery-item"><figure><a href="http://example.com"><amp-img src="http://example.com/img.png" width="600" height="400" data-amp-lightbox="" on="tap:amp-image-lightbox-1" role="button"></amp-img></a></figure></li></ul><amp-image-lightbox id="amp-image-lightbox-1" layout="nodisplay" data-close-button-aria-label="Close"></amp-image-lightbox>',
'<ul data-amp-lightbox="true"><li class="blocks-gallery-item"><figure><a href="http://example.com"><amp-img src="http://example.com/img.png" width="600" height="400" data-amp-lightbox="" on="tap:amp-image-lightbox" role="button"></amp-img></a></figure></li></ul><amp-image-lightbox id="amp-image-lightbox" layout="nodisplay" data-close-button-aria-label="Close"></amp-image-lightbox>',
),

'data_amp_with_lightbox_and_carousel' => array(
'<ul data-amp-lightbox="true" data-amp-carousel="true"><li class="blocks-gallery-item"><figure><a href="http://example.com"><amp-img src="http://example.com/img.png" width="600" height="400"></amp-img></a></figure></li></ul>',
'<amp-carousel height="400" type="slides" layout="fixed-height"><amp-img src="http://example.com/img.png" width="600" height="400" data-amp-lightbox="" on="tap:amp-image-lightbox-1" role="button"></amp-img></amp-carousel><amp-image-lightbox id="amp-image-lightbox-1" layout="nodisplay" data-close-button-aria-label="Close"></amp-image-lightbox>',
'<amp-carousel height="400" type="slides" layout="fixed-height"><amp-img src="http://example.com/img.png" width="600" height="400" data-amp-lightbox="" on="tap:amp-image-lightbox" role="button"></amp-img></amp-carousel><amp-image-lightbox id="amp-image-lightbox" layout="nodisplay" data-close-button-aria-label="Close"></amp-image-lightbox>',
),
);
}
Expand Down

0 comments on commit 6900e2b

Please sign in to comment.