-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Apply visibility: hidden to carousel spacers in amp-carousel 0.2 #33279
Conversation
Thanks for this!
I only see the addition of |
Nope. The description is saying that |
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.
LGTM, two small questions.
@@ -57,17 +57,17 @@ | |||
* calculating the 100% height (or width) of the slide. | |||
*/ | |||
/* Firefox */ | |||
.i-amphtml-carousel-scroll[hide-scrollbar="true"] { | |||
scrollbar-width: none; | |||
.i-amphtml-carousel-scroll[hide-scrollbar='true'] { |
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.
This change appears unrelated, was this from prettier formatting?
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.
Yea this whole file was formatted in 11b3b3a
overflow: hidden; | ||
} | ||
|
||
.i-amphtml-carousel-spacer { | ||
z-index: -1; | ||
visibility: hidden; |
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.
Does this carry an accessibility concern? I can't imagine it does, but just want to verify.
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.
Confirming there is no impact on accessibility with this change.
Spacer elements are used to establish scroll width / scroll momentum but should not themselves be seen. This change should also save some work in the rendering engine without impacting end user experience.
Impacts
amp-carousel-0.2
andamp-base-carousel-0.1
.Notes:
content-visibility: hidden
as we will never switch betweenhidden
andvisible
statesdisplay: none
as these elements should still have size (hence the name "spacer"!)