-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Image with Text] Fixed background position #2530
Conversation
Note: Really doesn't work well with landscape images 😬 |
Good catch. My bad. I'll give this some extra tests and tweaks, @melissaperreault. It's a bit tricky to get the sizes right on this one as it's only taking a small portion of the page but the image below needs a fixed width. We have ways to know whether an image is landscape or portrait by its aspect ratio, so there is probably a way to make some changes to treat them differently on CSS. |
c6cd0df
to
d1adaea
Compare
d1adaea
to
8d5a1ee
Compare
I kinda feel like we could question the usage of Fixed images tend to take up all the viewport space and the image from the image with text section isn't always that big. You can think of its container as the window through which we can see the image taking the full viewport size. So what we can see if very limited to the size of that "window", kinda like this: Unless there is a workaround. Right now, only when the image is set to large height and width it will make sense to enable it 🤔 And on mobile as well since the image will be 100% width of the viewport. What's your thoughts on this @LucasLacerdaUX ? |
What needs to be done
|
PR Summary:
Introduces a new
Fixed background position
option toImage behavior
in the Image with Text section.Why are these changes introduced?
Fixes #2344.
What approach did you take?
animation--{{ image_behavior }}
class to applyanimation--fixed
fade-in
animation when usingfixed
position (position:fixed
is not compatible withtransform
, as it creates a new positioning context by design)Testing steps/scenarios
Image behavior
toFixed background position
Image first
andImage second
values forDesktop image placement
Demo links
Checklist