Skip to content
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

Bug: AlignWide content clipped #1916

Open
spaceninja opened this issue Jul 7, 2022 · 2 comments
Open

Bug: AlignWide content clipped #1916

spaceninja opened this issue Jul 7, 2022 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@spaceninja
Copy link
Member

spaceninja commented Jul 7, 2022

At some viewport sizes, content with the alignwide class is being clipped by the viewport. In the attached screenshot, the viewport is 1265px wide, but the alignwide content is 1280px wide. I'm guessing the vw calculations are off somehow — perhaps due to visible scrollbars?

Screen Shot 2022-07-07 at 9 53 27 AM

@spaceninja spaceninja created this issue from a note in cloudfour.com-patterns@next (🔙 Backlog) Jul 7, 2022
@spaceninja spaceninja added 🐛 bug Something isn't working size:1 labels Jul 7, 2022
@tylersticka
Copy link
Member

Tangent: Would be cool if we could use progressive enhancement to use the new viewport units in supported browsers

@tylersticka tylersticka self-assigned this Jul 11, 2022
@tylersticka tylersticka moved this from 🔙 Backlog to ⌛️ In Progress in cloudfour.com-patterns@next Jul 11, 2022
@tylersticka tylersticka added the ✒️ gutenberg A change to our WordPress Gutenberg integration label Jul 11, 2022
@tylersticka
Copy link
Member

So I see two issues here.

One issue is small: The Deck block probably needs to add padding when its alignment is wide or full. Even if the scrollbar width is restored, this example shows that horizontal padding is still necessary to keep content from running into the margins.

The second issue is larger: We aren't accounting for scrollbars in our calculation. That's been true of our main site since 2016, it's something I talk about in my original article. It just hasn't come up because, most of the time, those 15 pixels haven't included valuable information.

The fix for that is known: Use svw where its supported, and use custom properties and a JavaScript calculation where it isn't as a fallback.

But I have a feeling that if we solve the first issue, we'll have a lot less compelling reason to prioritize the second. And if we wait just a bit longer, we may not need the JavaScript-based fallback... svw support is already in Firefox and Safari, and it's behind a flag in Chrome.

So I'm going to create a separate issue for the padding thing, and I'm going to keep this issue open but out of this project as a showstopper.

@tylersticka tylersticka removed the ✒️ gutenberg A change to our WordPress Gutenberg integration label Jul 11, 2022
@tylersticka tylersticka removed this from ⌛️ In Progress in cloudfour.com-patterns@next Jul 11, 2022
@tylersticka tylersticka removed their assignment Jul 11, 2022
@tylersticka tylersticka removed the size:1 label Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants