-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 image banner settings #900
Conversation
.banner__buttons { | ||
display: inline-flex; | ||
flex-wrap: wrap; | ||
gap: 1rem; |
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.
We may need to use margin instead, since flex gap isn't supported in all latest (and latest -1) browser versions. Although the previous implementation already uses this property https://github.com/Shopify/dawn/pull/900/files#r751679171
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.
Something here to keep in mind / double check 🤔
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.
Gap is being used across the theme in many other files 🤔 maybe we can make an audit
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.
Sounds good. To note is that the gap property is well supported for grid
layout but less for flexbox
ones.
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.
Created an issue here :) #964
.banner__box > .banner__buttons { | ||
display: flex; | ||
align-items: baseline; | ||
gap: 1rem; |
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 will be taking over this section now :) |
We now have settings for mobile text alignment as well. https://screenshot.click/19-31-0q6f8-wk4nx.png @wiktoriaswiecicka Not sure if this should be under |
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 good. Just noticed an issue with button alignment.
The content has been updated:
|
@@ -1,3 +1,36 @@ | |||
.email-signup-banner .newsletter-form, |
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.
@melissaperreault @wiktoriaswiecicka What do you think of updating the label for the mobile alignment? Or maybe it's clearer to keep it 🤔
Original comment
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.
Aligned it shouldn't say mobile under the "mobile" header.
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 am late to the party! But as discussed in today's UX review, we'll keep "mobile" under mobile header for clarity.
Updated both sections email banner and image banner to have text style setting: |
cc56bbb
to
1a8e78f
Compare
@media screen and (min-width: 750px) { | ||
.banner__content { | ||
padding: 5rem; | ||
} | ||
|
||
.banner__content--top-left { | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
} | ||
|
||
.banner__content--top-center { | ||
align-items: flex-start; | ||
justify-content: center; | ||
} | ||
|
||
.banner__content--top-right { | ||
align-items: flex-start; | ||
justify-content: flex-end; | ||
} | ||
|
||
.banner__content--middle-left { | ||
align-items: center; | ||
justify-content: flex-start; | ||
} | ||
|
||
.banner__content--middle-center { | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.banner__content--middle-right { | ||
align-items: center; | ||
justify-content: flex-end; | ||
} | ||
|
||
.banner__content--bottom-left { | ||
align-items: flex-end; | ||
justify-content: flex-start; | ||
} | ||
|
||
.banner__content--bottom-center { | ||
align-items: flex-end; | ||
justify-content: center; | ||
} | ||
|
||
.banner__content--bottom-right { | ||
align-items: flex-end; | ||
justify-content: flex-end; | ||
} | ||
} |
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.
This needs to go below the .banner__content
class below. Otherwise the setting doesn't work on desktop because it's always overwritten by the value below.
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 found one issue and a setting we need to update. I know Ludo has already approved, so we can merge it but we need to make a PR right after to fix address two things:
- The desktop content position section isn't working for both sections.
text_style
alignment. I think we should remove this for the email signup section. We can touch base with Wik and Meli, but if the plan is to remove this for this setting type, I'd like to remove it before the release this week.
{ | ||
"value": "caption-with-letter-spacing", | ||
"label": "t:sections.email-signup-banner.blocks.paragraph.settings.text_style.options__3.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 think we are going to remove this style from text blocks
Do we want to wait until we add the caption block to remove it? If so, I think we should increase the size of the uppercase font because it's 10px currently.
cc. @melissaperreault @wiktoriaswiecicka
|
||
.banner--desktop-transparent .email-signup-banner__box--no-image .field__button:focus-visible { | ||
outline: 0.2rem solid rgba(var(--color-base-text), 0.5); | ||
outline-offset: 0.3rem; |
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 was just suggesting removing the outline-offset: 0.3rem;
line, as it's directly assigned to all elements that can receive :focus-visible
. I know we will need the Outline and box-shadow properties 👍🏻
Why are these changes introduced?
Fixes #890
What approach did you take?
Text alignment
Desktop text position
to enable horizontal positioningmodifiers (See "Other considerations")
Other considerations
Before
Use setting value to set element class modifier. Then use CSS to target class modifiers.
After
Use setting value directly in CSS. This requires less code overall if there are multiple options.
Demo links
Checklist