Subject: | Order and second with same header not preserved |
Hi,
Text::Sass does not preserve order of the sass. I see from the code that this might be from
design, but it should be better to do it in the same order.
I have solved this, in my branch, should I give you a diff?
- Bjørn-Olav
Subject: | 91-keep-order.t |
use strict;
use warnings;
use Text::Sass;
use Test::More tests => 2;
# $Text::Sass::DEBUG = 1;
{
my $css = <<EOT;
h1 {
color: #333;
}
h2 {
color: #555;
}
h1 {
display: none;
}
EOT
my $sass = <<EOT;
h1
color: #333
h2
color: #555
h1
display: none
EOT
my $ts = Text::Sass->new();
is($ts->sass2css($sass), $css, "sass to css conversion ok");
}
{
my $css = <<EOT;
h2 {
color: #333;
}
h1 {
color: #555;
}
EOT
my $sass = <<EOT;
h2
color: #333
h1
color: #555
EOT
my $ts = Text::Sass->new();
is($ts->sass2css($sass), $css, "sass to css conversion ok");
}