medialize / sass.js

Sass.js - API for emscripted libsass to run in the browser

Home Page:http://medialize.github.io/playground.sass.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comments in the wrong place

babobski opened this issue · comments

I'm maintaining the sass compiler addon for Komodo Ide, I got an issue reported about compiling comments in a weird way.

When you compile this piece of scss:

$main: #333;
$accent: #555;

#content .LightBlueContent,
#content .DarkBlueContent,
footer{
  /* Make the links match the page colours */
  /*Standard colours*/
  a:link, a:visited{ color: white;} /*Normal*/
  a:hover, a:active{ color: #ccc;} /*Hover*/ 

  /*Bullet point colours*/
  div.dl{color: white;}

  /*Button styling */
  .wButton:not(.sButton) span,
  .webeditShareComponent button > span{
    background: white;
    color: $main;
    text-shadow: none;
    transition: 0.5s;
    padding: 5px 10px;
    text-transform: uppercase;
    border-radius: 0;
    border: none;
  }

  .wButton:not(.sButton):hover span,
  .webeditShareComponent:hover button > span{
    background: white;
    color: $accent; 
  }
}

The outputted css:

#content .LightBlueContent,
#content .DarkBlueContent,
footer {
  /* Make the links match the page colours */
  /*Standard colours*/
  /*Normal*/
  /*Hover*/
  /*Bullet point colours*/
  /*Button styling */
}

#content .LightBlueContent a:link, #content .LightBlueContent a:visited,
#content .DarkBlueContent a:link,
#content .DarkBlueContent a:visited,
footer a:link,
footer a:visited {
  color: white;
}

#content .LightBlueContent a:hover, #content .LightBlueContent a:active,
#content .DarkBlueContent a:hover,
#content .DarkBlueContent a:active,
footer a:hover,
footer a:active {
  color: #ccc;
}

#content .LightBlueContent div.dl,
#content .DarkBlueContent div.dl,
footer div.dl {
  color: white;
}

#content .LightBlueContent .wButton:not(.sButton) span,
#content .LightBlueContent .webeditShareComponent button > span,
#content .DarkBlueContent .wButton:not(.sButton) span,
#content .DarkBlueContent .webeditShareComponent button > span,
footer .wButton:not(.sButton) span,
footer .webeditShareComponent button > span {
  background: white;
  color: #333;
  text-shadow: none;
  transition: 0.5s;
  padding: 5px 10px;
  text-transform: uppercase;
  border-radius: 0;
  border: none;
}

#content .LightBlueContent .wButton:not(.sButton):hover span,
#content .LightBlueContent .webeditShareComponent:hover button > span,
#content .DarkBlueContent .wButton:not(.sButton):hover span,
#content .DarkBlueContent .webeditShareComponent:hover button > span,
footer .wButton:not(.sButton):hover span,
footer .webeditShareComponent:hover button > span {
  background: white;
  color: #555;
}

Expected result:

/* Make the links match the page colours */
/*Standard colours*/
/*Normal*/
#content .LightBlueContent a:link, #content .LightBlueContent a:visited,
#content .DarkBlueContent a:link,
#content .DarkBlueContent a:visited,
footer a:link,
footer a:visited {
  color: white;
}

/*Hover*/
#content .LightBlueContent a:hover, #content .LightBlueContent a:active,
#content .DarkBlueContent a:hover,
#content .DarkBlueContent a:active,
footer a:hover,
footer a:active {
  color: #ccc;
}

/*Bullet point colours*/
#content .LightBlueContent div.dl,
#content .DarkBlueContent div.dl,
footer div.dl {
  color: white;
}

/*Button styling */
#content .LightBlueContent .wButton:not(.sButton) span,
#content .LightBlueContent .webeditShareComponent button > span,
#content .DarkBlueContent .wButton:not(.sButton) span,
#content .DarkBlueContent .webeditShareComponent button > span,
footer .wButton:not(.sButton) span,
footer .webeditShareComponent button > span {
  background: white;
  color: #333;
  text-shadow: none;
  transition: 0.5s;
  padding: 5px 10px;
  text-transform: uppercase;
  border-radius: 0;
  border: none;
}

#content .LightBlueContent .wButton:not(.sButton):hover span,
#content .LightBlueContent .webeditShareComponent:hover button > span,
#content .DarkBlueContent .wButton:not(.sButton):hover span,
#content .DarkBlueContent .webeditShareComponent:hover button > span,
footer .wButton:not(.sButton):hover span,
footer .webeditShareComponent:hover button > span {
  background: white;
  color: #555;
}

Im sorry, I must've missed this issued. Does the problem still persist?

Can hapen, I havend updated to the latest release jet. Will try to update it this weekend, I will come back if the issue still persist.

This seems in line with the output of official sass.
Just tested on https://www.sassmeister.com/
If you think this is a bug you may open an issue
on upstream sass repo: https://github.com/sass/sass
BTW. it's pretty much impossible to know where you would
expect the comments to be. In fact they do belong
to the block scope where they are outputted.

closing because comments seem to work as expected, thanks @mgreter for chiming in!