-
Notifications
You must be signed in to change notification settings - Fork 335
stop videos causing horizontal scrolling #4495
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
Conversation
✅ Deploy Preview for wcag2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
really wish relevant CSS could just be added to the standard w3c stylesheet rather than ad-hoc like this |
|
Indeed. |
|
@kfranqueiro Any chance of getting the W3C stylesheets updated to add |
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.
We shouldn't need to do this inline on every video; in fact, Patrick contributed a PR before that applies this centrally.
We already have a style like this in this repo's own base.css, specifically for .example video and #examples video, originating in #3115 (which is what Patrick's PR followed up on).
I'm not sure if there was an actively-observed preventive reason as to why the selector was limited to examples sections, or if it was purely based on assumptions that the Reflow page now breaks due to its heading structure being inconsistent with most other Understanding pages. I can ask @iadawn if he happens to remember.
I also notice we have a style scoped to figure video elsewhere in base.css, and wonder if the same selector would be reasonable to use for this.
To apply `max-width:100%` via [wcag base css](https://github.com/w3c/wcag/blob/fe176052f282d87a6fd131fdf3604b22d8d3051e/css/base.css#L420)
|
updated the PR to add an |
|
I checked with Kevin, and the reason behind the selector he used was purely for defensive coding without digging deeper into potential ripple effects at the time. I checked the wcag repository, and the only instances of So I think we could safely change the selector around #examples video,
figure video {
max-width: 100%;
}Then you shouldn't need to touch reflow.html at all. Do you want to try this, or would you like me to create an alternative PR? |
|
Videos in the Reflow Understanding document were causing horizontal scrolling at 320px width. This fixes that issue.