Repository navigation
Closed
Labels
lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.
Description
I ran prettier on our SCSS files to see if we can use it also for .scss files next to .js files & I noticed a couple of things:
- Selectors are flattened
- &:before,
- &:after {
+ &:before, &:after {- @media all and (-webkit-min-device-pixel-ratio : 1.5),
- all and (-o-min-device-pixel-ratio: 3/2),
- all and (min--moz-device-pixel-ratio: 1.5),
- all and (min-device-pixel-ratio: 1.5) {
+ @media all and (-webkit-min-device-pixel-ratio: 1.5), all and (-o-min-device-pixel-ratio: 3/2), all and (min--moz-device-pixel-ratio: 1.5), all and (min-device-pixel-ratio: 1.5) {- Some values are formatted in a kind of weird way, I assume Prettier is trying to limit the line to 80 characters so that's why this is happening. But for S/CSS maybe the limit can be disabled or changed to something like 120?
Some examples:
- border-left: 1px solid mix($warningBackgroundColor, $warningBorderColor, 50%);
+ border-left: 1px
+ solid
+ mix($warningBackgroundColor, $warningBorderColor, 50%);- $fontFamily: "Lato", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ $fontFamily: "Lato",
+ -apple-system,
+ "Helvetica Neue",
+ Helvetica,
+ Arial,
+ sans-serif;- Some problems with inline comments
- background-position: center bottom; // center the image using background position
+ background-position: center
+ bottom; // center the image using background position- span.label { // 1
+ span.label {
+ // 1Metadata
Metadata
Assignees
Labels
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
yuchi commentedon Jun 21, 2017
A small note: your first point (flattened selectors lists) has been already addressed in #2047 and merged but not released yet (happened the day after the 1.4.4 release).
@vjeux when is the ETA for this?
vjeux commentedon Jun 21, 2017
For 3) and 4), I'm going to look into using
fill()for those, it's indeed weird when it breaks for everyone of them.is intended, we don't want the comment to go past 80 columns so we break.
is intended as well. The underlying comment algorithm has a limited number of ways we can encode them and we cannot support comments attached to
{. This is a bit unfortunate but it's usually easy to fix by putting the comment on the line above.@yuchi, I'm back from vacation and had to spend time rewriting the README in order to defuse drama around eslint. Hopefully by the end of the week/early next week.
yuchi commentedon Jun 21, 2017
Thanks for the feedback on the release. Can we help on some of these? Any pointers? (Also related to wording on readme if a non-native english speaker can help)
vjeux commentedon Jun 21, 2017
@yuchi I'm not actively looking for help but if you come up with better wording on the README or send a fix for an issue labelled as "bug", it'll be appreciated :)
Use fill for CSS values
vjeux commentedon Jun 21, 2017
Actually, #2224 also fixes the first issue you have with comments :)
Use fill for CSS values (#2224)
ahmedelgabri commentedon Jun 22, 2017
Thanks @vjeux!
One small question :)
makes sense, but what can prevent us from passing
--print-widthto CSS too?vjeux commentedon Jun 22, 2017
--print-width is already working for css. I just used 80 as an example.
ahmedelgabri commentedon Jun 22, 2017
I didn't know that, thanks!