Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Values between 0 and 1 sometimes get rounded to 0 #154

Open
exophunk opened this Issue · 8 comments

5 participants

exophunk Brunno Pleffken Eugene ClemensSahs TheJaredWilcurt
exophunk

I cannot reproduce this error continuously, but if I use

.item { background: rgba(white,0.5); }

it works usually, but every 5 to 10th compile with Scout, the element has no background. After removing the code and adding it again, it's there again.

So sometimes the color with opacity values get ignored...

Brunno Pleffken

I'm experiencing this same issue (Windows 8.1 Pro x64)... It's annoying, all decimal numbers between 0 and 1 get rounded to 0, messing with all my opacities and shadows...

Eugene

I can reproduce this on Windows 7 x32.
I have 3 SCSS files:

// app.scss
@import "a.scss";
@import "b.scss";
// a.scss
.item {
    background: rgba(#FFF, 0.3); 
}
// b.scss
.other-item {
    background: rgba(#000, 0.2);
}

Result of compiling

.item { background: rgba(255, 255, 255, 0.3); }
.other-item { background: rgba(0, 0, 0, 0.2); }

Ok! Now I make some changes in b.scss (even adding a space).
And new result is

.item { background: rgba(255, 255, 255, 0); }
.other-item { background: rgba(0, 0, 0, 0.2); }

Noticed zero? Let's change a.scss (just adding space in the end of the file).
Whoops, another zero:

.item { background: rgba(255, 255, 255, 0.3); }
.other-item { background: rgba(0, 0, 0, 0); }
Eugene

I think it floor the float value

ClemensSahs

i can reproduce this like Agent-J on my mac, too.

Anytime I make a change and the float value is not defined in the current saved file any generated files have a zero for float.

//_base.scss
$floatVar1: 0.5;
$floatVar2: 1 / 2;
//file1.scss
@import base
.other-item {
background: rgba(#FFF, $floatVar1);
}
//file2.scss
@import base
.other-item {
background: rgba(#000, $floatVar2);
}

save base will work fine
file1 and file2 not

TheJaredWilcurt

@ClemensSahs Your syntax is incorrect.

For file1.scss and file2.scss you should start with

@import "_base.scss";

and not

@import base

When I do that everything works fine and scout produces the expected files/css.

ClemensSahs

@TheJaredWilcurt

the only typo is the missing ";" and quotes

this both version are equal ;)

@import "base";
@import "_base.scss";
ClemensSahs

any progress?

ClemensSahs

update

Any time this happens, the "expanded comment" has a absoluten directory path. Anything works fine it will be relative path.

#works
/* line 28, ../scss/page.scss */

#fail
/* line 28, /path/to/workspace/project/scss/page.scss */

Perhaps this can help you to fix this.

best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.