You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
css @media tag formatting doesn't respect line length #2198
help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.
When prettifying css, @media tags aren't broken up in a way that respects the max line length e.g.
I had the following
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
Which was reformatted to
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-webkit-min-dev
ice-pixel-ratio: 1.5), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-
min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (m
in-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
Despite this exceeding the max line length. My expectation was that the nearest comma separated section of the media declaration would be split onto a new line in the same way as css selectors.
help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.
Activity
vjeux commentedon Jun 19, 2017
Thanks for the repro, it indeed should break it into multiple lines.
It's not going to keep the whitespaces to align things though.
Allow long media rules to break
Allow long media rules to break (#2219)