-
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
Add gradient background settings #482
Conversation
templates/index.json
Outdated
@@ -2,9 +2,6 @@ | |||
"sections": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- revert before merge
config/settings_data.json
Outdated
@@ -1,63 +1,72 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- revert before merge
assets/base.css
Outdated
.gradient { | ||
background: var(--color-background); | ||
background: var(--gradient-background); | ||
background-repeat: no-repeat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this property (and this property in other files) needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it's probably best to not make assumptions about what background-repeat
value the merchant wants to use. I will remove this.
|
@Guillaumegranger1 Thanks for reviewing. I addressed the issues with ✅ and pushed the updates to the demo store. I also added a
Still looking into this, but I see different colors
Could you elaborate a bit more on what the issue is? Our implementation for focus rings uses the solid background color and is therefore visible on gradient backgrounds |
• Regarding the ring, this might be fine after all. I wanted to make sure it was working as intended and consistent everywhere 👍 |
I've pushed an update which removes the button background and updates the icon to the correct foreground color |
@Guillaumegranger1 , Another design decision is that now the header has been given a These can also be set to always follow |
@KaichenWang Pretty cool!! 😄 It behaves exactly how I like. I think it's perfect that the navigation elements and cart notification inherit the solid fallback.
• Accent 1: |
☝️ I'm testing the demo regarding the last point and it seems to be fixed now. Screen recording @KaichenWang are we all set? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty cool! We're going to see some interesting backgrounds over time I think (CSS pattern gallery)
A couple questions:
- product modals don't have the gradient as a bg, is that intentional? I could see how we don't want to have them everywhere.
- color scheme for the image banner isn't pulling from the gradient, should it ?
{ | ||
"id": "gradient_accent_1", | ||
"type": "color_background", | ||
"label": "t:settings_schema.colors.settings.gradient_accent_1.label" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like linking to some info about how gradients work or what to input could be useful. I see there is a placeholder in the popup but maybe we can link to the docs once they're out or confirm the url for them. Color scheme docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. There's still some ongoing discussion regarding merchant-facing copy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then on collage, the placeholder for the collection has a background set to it, so it looks a bit different than the other two cards:
Which highlights the fact that apparently the parent is a bit wider than the actual image: screenshot but that can be a follow up PR/issue
Co-authored-by: Ludo <ludo.segura@shopify.com>
Co-authored-by: Ludo <ludo.segura@shopify.com>
Co-authored-by: Ludo <ludo.segura@shopify.com>
Collage sectionThe following blocks have a
The other two types of blocks do not have a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@@ -11,9 +11,15 @@ | |||
"label": "Accent 1", | |||
"info": "Used for solid button background." | |||
}, | |||
"gradient_accent_1": { | |||
"label": "Accent 1 gradient" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The look of it is a bit cluttered. Would be nice to have some kinda of hierarchy/grouping. But for future polish/improvement. Also it looks like the look of the settings has been updated 🤔 (not here but on the theme editor level)
screenshot
@@ -724,6 +736,24 @@ | |||
"header": { | |||
"name": "Header", | |||
"settings": { | |||
"color_scheme": { | |||
"options__1": { | |||
"label": "Accent 1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not urgent: there's quite a few instances of these colours throughout Dawn and each setting has its own translations—we can clean this up by referencing the same translation.
* Add settings for gradients as text. Integrate setting into color system * Set giftcard number bg to transparent * Update temporary settings * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Remove background-repeat property * Fix color-inverse color scheme. Fix cart icon bubble colors * Add color scheme setting for header * Update from Shopify for theme dawn/add-background-setting * Update share button colors * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update from Shopify for theme dawn/add-background-setting * Update to color_background setting type for gradient colors * Revert 8046f7d * Revert setting changes from Shopify platform * Update sections/rich-text.liquid Co-authored-by: Ludo <ludo.segura@shopify.com> * Update sections/image-with-text.liquid Co-authored-by: Ludo <ludo.segura@shopify.com> * Update sections/header.liquid Co-authored-by: Ludo <ludo.segura@shopify.com> * Set transparent background color to share Co-authored-by: shopify-online-store[bot] <79544226+shopify-online-store[bot]@users.noreply.github.com> Co-authored-by: Ludo <ludo.segura@shopify.com>
Why are these changes introduced?
What approach did you take?
text
) underTheme settings
>Theme
>Colors
and pair with their respective "fallback" color settings:.gradient
utility class. When applied to an element, that element will be styled with a gradient background (if the gradient setting is not blank, otherwise the fallback solid color is used).Other considerations
Demo links
Checklist