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

more-less: use mask-image for blur effect #5291

Merged
merged 4 commits into from
Jan 8, 2025
Merged

Conversation

omsmith
Copy link
Contributor

@omsmith omsmith commented Jan 8, 2025

This PR improves the method for supporting the blur on non-white backgrounds from requiring the consumer specifying the blur color to using mask-image CSS. The mask-image will handle the simpler non-white background case as well as the more complicated AI gradient case described in the Slack thread that motivated this change.

https://d2l.slack.com/archives/C0PHG3QB0/p1736294752688859

Copy link
Contributor

github-actions bot commented Jan 8, 2025

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-5291/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

* The gradient color of the blurring effect
* @type {string}
*/
blurColor: { type: String, attribute: 'blur-color' },
Copy link
Contributor

@dbatiste dbatiste Jan 8, 2025

Choose a reason for hiding this comment

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

Was the purpose of this to allow consumers to match the blur to non-white background colors, and mask-image (using semi-transparent gradient) essentially handles that for us?

Copy link
Contributor Author

@omsmith omsmith Jan 8, 2025

Choose a reason for hiding this comment

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

Correct (there are 2 usages of it which could be removed)

@omsmith omsmith force-pushed the omsmith/more-less-mask branch from 9bf327c to cc144ff Compare January 8, 2025 15:32
@omsmith
Copy link
Contributor Author

omsmith commented Jan 8, 2025

Everyone happy with the golden changes? https://vdiff.d2l.dev/BrightspaceUI/core/cc144ffd2922e31e2fbfd561a79f75809d7dccf8/2025-01-08_15-38-23/report/

The filter diff is new / unrelated.

The button is 0.25em closer to the content now. Could add a margin to remove that difference if desired.

@dlockhart
Copy link
Member

Everyone happy with the golden changes?

Seems good to me. The filter one is flake that we've been unable to solve -- I've re-run the job so hopefully it clears up.

@omsmith omsmith marked this pull request as ready for review January 8, 2025 16:00
@omsmith omsmith requested a review from a team as a code owner January 8, 2025 16:00
@dbatiste
Copy link
Contributor

dbatiste commented Jan 8, 2025

Everyone happy with the golden changes?

Do we want/need a visual-diff test with a non-white background? Seems like that case isn't really covered.

omsmith and others added 3 commits January 8, 2025 16:45
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@dlockhart dlockhart merged commit c1f7306 into main Jan 8, 2025
6 checks passed
@dlockhart dlockhart deleted the omsmith/more-less-mask branch January 8, 2025 22:35
Copy link

🎉 This PR is included in version 3.79.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants