- Notifications
You must be signed in to change notification settings - Fork 9.4k
Fixed mobile version of checkout progress bar #36982
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
Changes from 1 commit
a2d99ee 65e190d 2951763 879705b ea73c15 548a604 2df6d51 f327b1a 0a56ecc b7472b5 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -10,13 +10,16 @@ | |
| @checkout-progress-bar__font-size: 18px; | ||
| @checkout-progress-bar__font-weight: @font-weight__light; | ||
| @checkout-progress-bar__margin: @indent__base; | ||
| @checkout-progress-bar__margin__mobile: 30px; | ||
| | ||
| @checkout-progress-bar-item__background-color: @color-gray-middle1; | ||
| @checkout-progress-bar-item__border-radius: 6px; | ||
| @checkout-progress-bar-item__color: @color-gray40; | ||
| @checkout-progress-bar-item__margin: @indent__s; | ||
| @checkout-progress-bar-item__transition: background .3s; | ||
| @checkout-progress-bar-item__width: 185px; | ||
| @checkout-progress-bar-item__width__mobile: 165px; | ||
| @checkout-progress-bar-item__width__mobile_small: 125px; | ||
| | ||
| @checkout-progress-bar-item__active__background-color: @active__color; | ||
| @checkout-progress-bar-item__active__color: @primary__color; | ||
| | @@ -57,8 +60,6 @@ | |
| // Desktop | ||
| // _____________________________________________ | ||
| | ||
| .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) { | ||
| | ||
| .opc-progress-bar { | ||
| .lib-css(margin, 0 0 @checkout-progress-bar__margin); | ||
| counter-reset: i; | ||
| | @@ -195,4 +196,27 @@ | |
| } | ||
| } | ||
| } | ||
| | ||
| // | ||
| // Mobile max width 600px | ||
| // | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should target for mobile device. These lines will also maybe duplicated for desktop There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not duplicated. Some kind of thing like margin and width is only changing based on screen size. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. without wrap between media mixins your code styles probably duplicated in both final output files styles-m.css and styles-l.css as i remember before There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want apply for mobile move code between for apply also mobile and desktop & when (@media-common = true) { //Your code here } | ||
| @media only screen and (max-width: 600px) { | ||
| .opc-progress-bar { | ||
| .lib-css(margin, 0 0 @checkout-progress-bar__margin__mobile); | ||
| counter-reset: i; | ||
| display: block; | ||
| font-size: 0; | ||
| } | ||
| .opc-progress-bar-item { | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need whitespace between each selectors | ||
| .lib-css(width, @checkout-progress-bar-item__width__mobile); | ||
| } | ||
| } | ||
| | ||
| // | ||
| // Mobile max width 320px and 280px | ||
| // | ||
| @media (min-width: 280px) and (max-width: 320px) { | ||
| .opc-progress-bar-item { | ||
| .lib-css(width, @checkout-progress-bar-item__width__mobile_small); | ||
| } | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also you should use screen variables instead hardcoded fix value | ||
| } | ||
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.
any reason of remove this media mixin ?
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.
As this issue is working fine in blank theme. So I compared the code and there as well we don't have any mixin and using the progress bar code irrespective of view. So the progress bar will show in each device.