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
As seen above, if there are any comments within :root, the line breaks after them are removed (this is in contrast to comments outside of :root selectors). This also occurs if you use specify afterComment: true in the breaks formatting option. To me, it doesn't seem like this should be expected behavior, but I apologize if it is :)
The text was updated successfully, but these errors were encountered:
overdodactyl
changed the title
New lines not created after comments withing :root selectors
New lines not created after comments within :root selectors
Feb 24, 2018
Just to add to this, it seems like there are a few other inconsistencies when comments are kept inside some form of bracket. For example,
@media screen and (-moz-windows-theme) {
/*! Comment inside @media */#sample {
/*! Comment inside id */color:red;
}
}
@media screen and (-moz-windows-theme) {
#sample {
color:red;
}
}
gets reduced to
@media screen and (-moz-windows-theme) {
/*! Comment inside @media */#sample {
/*! Comment inside id */color: red
}
}
@media screen and (-moz-windows-theme) {
#sample {
color: red
}
}
In the above example, a comment inside @media does get a newline after it, but the one inside #sample does not. Additionally, the indent level seems to be get lost in #sample when keeping a comment.
Environment
clean-css version -
npm ls clean-css
:├─┬ clean-css-cli@4.1.10
│ └── clean-css@4.1.9
└─┬ gulp-clean-css@3.9.0
└── clean-css@4.1.9 deduped
node.js version -
node -v
: v8.9.3operating system: macOS 10.13
Configuration options
or, alternatively,
Input CSS
Actual output CSS
Expected output CSS
As seen above, if there are any comments within
:root
, the line breaks after them are removed (this is in contrast to comments outside of:root
selectors). This also occurs if you use specifyafterComment: true
in thebreaks
formatting option. To me, it doesn't seem like this should be expected behavior, but I apologize if it is :)The text was updated successfully, but these errors were encountered: