-
Notifications
You must be signed in to change notification settings - Fork 385
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
[Gutenberg] Add AMP Carousel for Gallery and AMP Lightbox features for Gallery and Image #1121
Changes from 17 commits
52943ed
fd662d7
54f9555
ed1f9de
0263878
40486fe
96bd515
553c4da
22060ec
5b63476
2e102ea
c3aad13
dd924ec
ca133a4
22597fa
b70af66
438567d
7ee5fd3
58430e4
55e8fff
f658c43
6900e2b
a69dd55
ff2cdd2
d5169ef
13267f6
134335e
26c491e
46c3a50
201654f
f9f3a05
cc53173
dbe281c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,11 @@ | |
/** Force the image into a box of fixed dimensions and use object-fit to scale. **/ | ||
object-fit: contain; | ||
} | ||
|
||
#amp-image-lightbox-1 img { | ||
object-fit: contain; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to be having any effect. I don't think it is needed? |
||
} | ||
|
||
.entry__content .wp-block-gallery[class*="columns-"] figure { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
width: 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this may just be needed in the ampnews theme. It doesn't seem necessary in Twenty Fifteen. It's probably just that the ampnews theme lacks all of the required styles. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should be targeting
img
elements in selectors. I should think that only targetingamp-img
should be done sinceimg
should really be the domain of theamp-img
to control?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like
amp-image-lightbox
component is empty by default and clicking on image which is targeting this lightbox will insert theimg
element into theamp-image-lightbox
, theamp-image-lightbox
component doesn't include an additionalamp-img
component within, targetingamp-img
doesn't seem to be possible in this case.For example after clicking on an an image the lightbox HTML looks like this:
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use AMP-generated class instead of
img
within 6900e2b.