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

refactor(Modal): use mask-image for overflow indicator #15734

Merged
merged 2 commits into from Feb 13, 2024

Conversation

tw15egan
Copy link
Member

@tw15egan tw15egan commented Feb 12, 2024

Refs #15727

While working on #15727 I used mask-image to fade out the overflow content inside Modal when hasScrollingContent is set to true. This PR refactors Modal and ComposedModal to use this property instead of pseudoelements to achieve the effect.

We could also use this to refactor CodeSnippet, but we would need to change the dimensions for RTL since the gradient directions do not use logical properties

Changelog

New

  • Applied mask-image to .cds--modal-scroll-content. The extra dimensions prevent the mask from overlaying the focus outline + scroll bar.

Removed

  • Removed cds--modal-content--overflow-indicator and all associated styles

Testing / Reviewing

Ensure there are no style regressions on the Modal and ComposedModal with scrolling content.

Copy link

netlify bot commented Feb 12, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 0072a70
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65cb86efbce38e0008e6d540
😎 Deploy Preview https://deploy-preview-15734--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

@guidari guidari added this pull request to the merge queue Feb 13, 2024
Merged via the queue into carbon-design-system:main with commit ffc385b Feb 13, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants