Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Only last set of box-shadow values being evaluated #49

Closed
iflan opened this issue Oct 23, 2015 · 1 comment
Closed

Only last set of box-shadow values being evaluated #49

iflan opened this issue Oct 23, 2015 · 1 comment
Assignees
Labels

Comments

@iflan
Copy link
Member

iflan commented Oct 23, 2015

Originally reported on Google Code with ID 30

What steps will reproduce the problem?
1. Set a box-shadow with multiple shadows, using @def or @defmixin parameters.
2. All but the last shadow set will quote the names literally in the compiled output.

What is the expected output? What do you see instead?

All the colour constants should be evaluated, eg:

@def FG_LIGHT rgb(255,255,255);
@def FG_MID rgb(128,128,128);
@def FG_DARK rgb(71,71,71);

@defmixin boxshadow(COL1,COL2,COL3) {
box-shadow: inset 0px 0px 0px 1px COL1, inset 0px 2px 1px 0px COL2, inset 0px 0px 0px
2px COL3;
}

@mixin boxshadow(FG_DARK,FG_LIGHT,FG_MID);
or
box-shadow: inset 0px 0px 0px 1px FG_DARK, inset 0px 2px 1px 0px FG_LIGHT, inset 0px
0px 0px 2px FG_MID;


Both should produce:

box-shadow: inset 0px 0px 0px 1px rgb(71,71,71), inset 0px 2px 1px 0px rgb(255,255,255),
inset 0px 0px 0px 2px rgb(128,128,128);

however, both actually produce, respectively:

box-shadow: inset 0px 0px 0px 1px COL1, inset 0px 2px 1px 0px COL2, inset 0px 0px 0px
2px rgb(128,128,128);

and

box-shadow: inset 0px 0px 0px 1px FG_DARK, inset 0px 2px 1px 0px FG_LIGHT, inset 0px
0px 0px 2px rgb(128,128,128);


What version of the product are you using? On what operating system?

Latest compiler (packaged 12/12/12), Windows 7 x64 with Java 7

Please provide any additional information below.

Reported by zulaxia on 2013-01-18 10:12:00

@iflan
Copy link
Member Author

iflan commented Jun 7, 2016

This is fixed.

@def FG_LIGHT rgb(255,255,255);
@def FG_MID rgb(128,128,128);
@def FG_DARK rgb(71,71,71);

@defmixin boxshadow(COL1,COL2,COL3) {
  box-shadow: inset 0px 0px 0px 1px COL1, inset 0px 2px 1px 0px COL2, inset 0px 0px 0px 2px COL3;
}

.foo {
  @mixin boxshadow(FG_DARK,FG_LIGHT,FG_MID);
}

.bar {
  box-shadow: inset 0px 0px 0px 1px FG_DARK, inset 0px 2px 1px 0px FG_LIGHT, inset 0px 0px 0px 2px FG_MID;
}

produces:

.foo, .bar {
  box-shadow: inset 0 0 0 1px #474747 , inset 0 2px 1px 0 #fff , inset 0 0 0 2px #808080;
}

@iflan iflan closed this as completed Jun 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant