How to use multiple gss files

396 views
Skip to first unread message

Kyaw

unread,
Nov 15, 2011, 9:11:52 PM11/15/11
to closure-stylesheets-discuss
The following compilation fail with GSS constant not undefined.

java -jar closure-stylesheets.jar --pretty-print --variables.gss --
main.css

==== variables.gss =======
@def BG_COLOR rgb(235, 239, 249);

@def DIALOG_BORDER_COLOR rgb(107, 144, 218);
@def DIALOG_BG_COLOR BG_COLOR;


====== main.gss =======
@import "variables.gss";

body {
background-color: BG_COLOR;
}

.dialog {
background-color: DIALOG_BG_COLOR;
border: 1px solid DIALOG_BORDER_COLOR;
}

Michael Bolin

unread,
Nov 17, 2011, 10:37:57 AM11/17/11
to closure-stylesheets-discuss
Thanks, this is a real bug.

I have put together a fix. In DefaultCommandLineCompiler.java, instead
of this code:

for (SourceCode source : job.inputs)
{
GssParser parser = new
GssParser(source);
parseAndPrint(result,
parser);
}

It should be this:

GssParser parser = new GssParser(job.inputs);
parseAndPrint(result, parser);

I'm working on getting this checked into the codebase, but if you need
this immediately, you can always make this change locally for now.

Michael Bolin

unread,
Nov 17, 2011, 3:35:15 PM11/17/11
to closure-style...@googlegroups.com
This change is checked in but I have not published a new binary yet. I am hoping to get one or two other changes in before creating a new download.

Kyaw

unread,
Nov 17, 2011, 10:08:31 PM11/17/11
to closure-stylesheets-discuss
thanks. It works.

thinking to change from SCSS to GSS.

Michael Bolin

unread,
Nov 18, 2011, 5:35:58 PM11/18/11
to closure-stylesheets-discuss
There is now a new jar with the bug fix on the Downloads page:

http://code.google.com/p/closure-stylesheets/downloads/list
Reply all
Reply to author
Forward
0 new messages