Skip Menu |

This queue is for tickets about the Text-Sass CPAN distribution.

Report information
The Basics
Id: 80927
Status: open
Priority: 0/
Queue: Text-Sass

People
Owner: rmp [...] psyphi.net
Requestors: bgrimm [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: nested includes cause errors
in _parse_css the check to parse nested css: if ($kv =~ /[{].*[}]/smx) { $self->_parse_css( $kv, $ssubstash, $symbols ); next; } has to be moved above the checks for include or extend if this type of structure can be parsed: @mixin test { color: #fff; } p { .a { .b { @include test; } } .c { @include test; } }
thanks for these two. I'll try and get fixes out in the next couple of hours.
fixed in 0.97, coming shortly
Am Do 08. Nov 2012, 14:48:02, RPETTETT schrieb: Show quoted text
> fixed in 0.97, coming shortly
Hi! I saw your solution to #80927, but as far as I can see, this does not work for parameters. Here is a test case that fails: { my $sass = <<'EOT'; @mixin test($color) { color: $color; } p { .a { .b { @include test(#fff); } } .c { @include test(#555); } } EOT my $css = <<EOT; p .a .b { color: #fff; } p .c { color: #555; } EOT my $ts = Text::Sass->new(); is($ts->scss2css($sass), $css, "scss to css for nested includes with parameters"); }
Hmm. Thanks for the report. Sorry about that. I'll roll your test in and see what I can do. Feel free to let me have a correct (re)patch ;)
0.96 (without the first patch) actually fails a simpler test case with parameters: @mixin test($color) { color: $color; } a { @include test(#222); } b { @include test(#eee); } becomes: a { color: #eee; } b { color: #eee; } The scope of the variable is being lost, but I haven't analyzed it to see where.
I think I remember putting a comment in about this - variables being global and broken in stupid ways. Will have a look this evening.