Skip to content

Mobile device style groups incorrect order in _responsive.less #14476

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

Closed
damiandawber opened this issue Mar 31, 2018 · 5 comments
Closed

Mobile device style groups incorrect order in _responsive.less #14476

damiandawber opened this issue Mar 31, 2018 · 5 comments
Assignees
Labels
Area: Frontend Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@damiandawber
Copy link

Style groups for mobile devices (max-width) are specified in the wrong order.

In lib/web/css/source/lib/_responsive.less the style groups run breakpoint-size ascending: 319px, 479px, 639px, 767px, which leads to outputting max-width media queries breakpoint-size ascending - the last-defined breakpoint overrides smaller screen size breakpoints...

Preconditions

Magento 2.2

Steps to reproduce

Specify styles referencing max media widths

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__xs) {
        .logo {
            max-width: 165px;
        }
}

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
        .logo {
            max-width: 140px;
        }
}

Expected result

CSS should be output as follows:

@media only screen and (max-width: 639px) {
  .logo {
    max-width: 165px;
  }
}
@media only screen and (max-width: 479px) {
  .logo {
    max-width: 140px;
  }
}

Actual result

CSS is output as follows:

@media only screen and (max-width: 479px) {
  .logo {
    max-width: 140px;
  }
}
@media only screen and (max-width: 639px) {
  .logo {
    max-width: 165px;
  }
}

The last-defined breakpoint takes precedence over the 479px breakpoint even at screen sizes <= 479px.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 31, 2018
@pemann
Copy link

pemann commented Jun 15, 2018

@magento-engcom-team Any progress on this one?

@ghost ghost self-assigned this Jul 19, 2018
@ghost ghost added Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Area: Frontend Fixed in 2.3.x The issue has been fixed in 2.3 release line Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release and removed Fixed in 2.3.x The issue has been fixed in 2.3 release line labels Jul 19, 2018
@ghost
Copy link

ghost commented Jul 19, 2018

HI @damiandawber thank you for your report.
We've acknowledged the issue and added to our backlog.

@ghost ghost removed their assignment Jul 19, 2018
@engcom-backlog-nickolas engcom-backlog-nickolas added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jul 20, 2018
@tejash-wagento tejash-wagento self-assigned this Jul 20, 2018
@sidolov
Copy link
Contributor

sidolov commented Jul 27, 2018

Hi @damiandawber. Thank you for your report.
The issue has been fixed in #16959 by @tejash-wagento in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.6 release.

@sidolov
Copy link
Contributor

sidolov commented Aug 1, 2018

Hi @damiandawber. Thank you for your report.
The issue has been fixed in #17240 by @tiagosampaio in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.15 release.

@sidolov sidolov added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Aug 1, 2018
@magento-engcom-team
Copy link
Contributor

Hi @damiandawber. Thank you for your report.
The issue has been fixed in #17209 by @torhoehn in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

7 participants