question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some CSS/SCSS feedback

See original GitHub issue

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 {
+  // 1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
yuchicommented, 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?

1reaction
vjeuxcommented, Jun 22, 2017

–print-width is already working for css. I just used 80 as an example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reviewing online tech courses: Front-end (html, css/scss, js)
I thought I could make a series to review some online courses about front-end development, angularjs, UX-UI design, photoshop, illustrator, and more!
Read more >
css/scss comments · Issue #3545
area:comments Issues with how Prettier prints comments lang:css/scss/less Issues affecting CSS, Less or SCSS locked-due-to-inactivity Please ...
Read more >
css - SCSS compiled with comments and structure
I am using CODA2 to create a my SCSS files and then compile into CSS, with also using SCOUT. I have just started...
Read more >
CSS, SCSS, and Less support in Visual Studio Code
Find out how Visual Studio Code can support your CSS, SCSS and Less development.
Read more >
Review & Feedback on tribute Page
Hi, I've just completed the tribute page and I need feedback. I did not use any framework, so just html and css( scss...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found