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

Leadspace Overflow: Breakpoint for c4d--leadspace__overlay is not applied #11729

Open
2 tasks done
ferrine opened this issue Apr 18, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working dev Needs some dev work

Comments

@ferrine
Copy link

ferrine commented Apr 18, 2024

Description

In the stackblitz example

https://www.ibm.com/standards/carbon/web-components/?path=/docs/components-lead-space--super

it is noticeable that the total width of the component exceeds the screen width

image

It causes issues with horizontal scrolling

Hotfix

After couple of hours of investigation, the issue was identified to be the inline-size of this container.

As I see in the source code it was intended to apply inline-size: auto after the breakpoint.

@include breakpoint-down(md) {
inline-size: auto;
}
}

And indeed if I manually change this property the layout is good.

image

I suspect there is an issue with the breakpoint and how scss got compiled, but this is beyond of what I can figure out now. But in the component css there are only two mentions of the inline size: mine and the initial one (which is 100% and works on fullscreen)

image

Other solutions

Other than figuring out the breakpoint one can set inline-size: auto just above in the media independent scope

position: relative;
z-index: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
inline-size: 100%;
max-inline-size: none;
padding-block-start: $spacing-05;

But it will cause a slight shift in gradient on full screen:

Before

image

After

image

Conclusions

I believe the solution with fixing breakpoint application is what has to be done since it can potentially affect future derivative work, but as for a temporary fix, I modify this inline-size in my component code.

Component(s) impacted

leadspace

Browser

Chrome, Safari

Carbon for IBM.com version

v2.7.0

Severity

Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.

Application/website

stuff

Package

@carbon/ibmdotcom-web-components

CodeSandbox example

https://stackblitz.com/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/web-components/examples/stackblitz/components/leadspace?file=index.html

Steps to reproduce the issue (if applicable)

Storybook example is broken

Release date (if applicable)

https://github.com/carbon-design-system/carbon-for-ibm-dotcom/releases/tag/v2.7.0

Code of Conduct

@ferrine ferrine added bug Something isn't working dev Needs some dev work labels Apr 18, 2024
@ferrine ferrine changed the title [YOUR TITLE]: Leadspace Breakpoint #{$c4d-prefix}--leadspace__overlay is not applied Leadspace Overflow: Leadspace Breakpoint for c4d--leadspace__overlay is not applied Apr 18, 2024
@ferrine ferrine changed the title Leadspace Overflow: Leadspace Breakpoint for c4d--leadspace__overlay is not applied Leadspace Overflow: Breakpoint for c4d--leadspace__overlay is not applied Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dev Needs some dev work
Projects
Status: No status
Development

No branches or pull requests

1 participant