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

Collapsible content media with global settings #1232

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

ludoboludo
Copy link
Contributor

Why are these changes introduced?

Tackles part of #1043

What approach did you take?

Added the global-media-settings class on the media wrapper and applied on the section, this styling:

position: relative;
z-index: 0;

So that the shadow could come up. Same fix is applied on other sections and there is a PR looking into refactoring that approach: #1209

To test

Go to the editor and play around with the global media settings

Demo links

Checklist

media with global settings
Copy link
Contributor

@melissaperreault melissaperreault left a comment

Choose a reason for hiding this comment

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

Thank you Ludo!

Observation

Otherwise looks good!

@ludoboludo
Copy link
Contributor Author

ludoboludo commented Jan 20, 2022

Shadow vertical offset negative would overlap other media, but not when the value is positive and not if it is a section

@melissaperreault I believe it's known and technically logic for the shadow of an element to be hover what precedes them. It's the natural "stacking" context. Think of it as a stair case. The first step from the bottom being the first section, then the second is above it and so on.

I think the way to go about it is just to trust merchants to add enough section spacing and section padding to take into account the shadows they're adding 🤔

We could have it always be over the section above by making sure we apply the isolate styling, Sofia is looking into in her PR I believe.

@ludoboludo ludoboludo mentioned this pull request Jan 20, 2022
5 tasks
Copy link
Contributor

@melissaperreault melissaperreault left a comment

Choose a reason for hiding this comment

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

LGTM! 🚢 🎉

@@ -10,8 +10,9 @@
}
}

.collapsible-content__media {
background-color: transparent;
.collapsible-content {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we created the class .isolate in this PR can we re-use it here? #1247

It does the same thing 🤔 What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ill add the class where you added it too so that when merging there isn't any conflict with your PR :)

Copy link
Contributor

@sofiamatulis sofiamatulis left a comment

Choose a reason for hiding this comment

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

Looks great! 🎉 You may just need to rebase since my PR was merged #1247

Copy link
Contributor

@tyleralsbury tyleralsbury left a comment

Choose a reason for hiding this comment

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

Looks good - tested both with and without gradient.

@ludoboludo ludoboludo merged commit 64af5ca into main Jan 24, 2022
@ludoboludo ludoboludo deleted the collapsible-global-settings branch January 24, 2022 21:20
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants