sassc 1.11.0 → 1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/ext/libsass/src/expand.cpp +19 -8
- data/ext/libsass/src/functions.cpp +14 -4
- data/ext/libsass/src/units.cpp +3 -3
- data/lib/sassc/version.rb +1 -1
- data/test/native_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2003bd0fdc35ac8281c0f203771b9e88e3554ce6
|
4
|
+
data.tar.gz: 4181ece117d80e29ff8abf55805fc8e7710e3c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ff8a7c1c903405f2124f670b5277fee9f47bd4f61c5c429524b1812a8c3497fd1f4c0ca6812bc886b4414bdeb70846f3a69aef2d0cfd124c5cc30c2e332773
|
7
|
+
data.tar.gz: cc5690cb269eaa0408ae7c5b6f72aa71b11530357a72b930f3bfcae95ef56df708b97ba1a0c7af6e806802479023e4a306e22ae3758fac656bec84dbb270b494
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@ This gem combines the speed of `libsass`, the [Sass C implementation](https://gi
|
|
6
6
|
|
7
7
|
### libsass Version
|
8
8
|
|
9
|
-
[3.4.
|
9
|
+
[3.4.1](https://github.com/sass/libsass/releases/tag/3.4.1)
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -49,6 +49,8 @@ and [awesome contributors](https://github.com/bolandrm/sassc-ruby/graphs/contrib
|
|
49
49
|
|
50
50
|
## Changelog
|
51
51
|
|
52
|
+
- **1.11.1**
|
53
|
+
- [Update to libsass 3.4.1](https://github.com/sass/sassc-ruby/pull/61)
|
52
54
|
- **1.11.0**
|
53
55
|
- [Add support for lists in functions](https://github.com/sass/sassc-ruby/pull/55)
|
54
56
|
- [Update to libsass 3.4.0](https://github.com/sass/sassc-ruby/pull/57)
|
data/ext/libsass/src/expand.cpp
CHANGED
@@ -611,18 +611,29 @@ namespace Sass {
|
|
611
611
|
{
|
612
612
|
if (CommaSequence_Selector* extender = dynamic_cast<CommaSequence_Selector*>(selector())) {
|
613
613
|
Selector* s = e->selector();
|
614
|
-
|
615
|
-
|
614
|
+
CommaSequence_Selector* sl = NULL;
|
615
|
+
// check if we already have a valid selector list
|
616
|
+
if ((sl = dynamic_cast<CommaSequence_Selector*>(s))) {}
|
617
|
+
// convert selector schema to a selector list
|
618
|
+
else if (Selector_Schema* schema = dynamic_cast<Selector_Schema*>(s)) {
|
619
|
+
if (schema->has_real_parent_ref()) {
|
620
|
+
sl = eval(schema);
|
621
|
+
} else {
|
622
|
+
selector_stack.push_back(0);
|
623
|
+
sl = eval(schema);
|
624
|
+
sl->remove_parent_selectors();
|
625
|
+
selector_stack.pop_back();
|
626
|
+
}
|
616
627
|
}
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
628
|
+
// abort on invalid selector
|
629
|
+
if (sl == NULL) return NULL;
|
630
|
+
for (Sequence_Selector* cs : *sl) {
|
631
|
+
if (cs != NULL && cs->head() != NULL) {
|
632
|
+
cs->head()->media_block(media_block_stack.back());
|
622
633
|
}
|
623
634
|
}
|
624
635
|
selector_stack.push_back(0);
|
625
|
-
expand_selector_list(
|
636
|
+
expand_selector_list(sl, extender);
|
626
637
|
selector_stack.pop_back();
|
627
638
|
}
|
628
639
|
return 0;
|
@@ -1016,20 +1016,30 @@ namespace Sass {
|
|
1016
1016
|
String_Constant* s = ARG("$string", String_Constant);
|
1017
1017
|
double start_at = ARG("$start-at", Number)->value();
|
1018
1018
|
double end_at = ARG("$end-at", Number)->value();
|
1019
|
+
String_Quoted* ss = dynamic_cast<String_Quoted*>(s);
|
1019
1020
|
|
1020
1021
|
std::string str = unquote(s->value());
|
1021
1022
|
|
1022
1023
|
size_t size = utf8::distance(str.begin(), str.end());
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1024
|
+
|
1025
|
+
if (!dynamic_cast<Number*>(env["$end-at"])) {
|
1026
|
+
end_at = -1;
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
if (end_at == 0 || (end_at + size) < 0) {
|
1030
|
+
if (ss && ss->quote_mark()) newstr = quote("");
|
1031
|
+
return SASS_MEMORY_NEW(ctx.mem, String_Quoted, pstate, newstr);
|
1026
1032
|
}
|
1033
|
+
|
1027
1034
|
if (end_at < 0) {
|
1028
1035
|
end_at += size + 1;
|
1029
1036
|
if (end_at == 0) end_at = 1;
|
1030
1037
|
}
|
1031
1038
|
if (end_at > size) { end_at = (double)size; }
|
1032
|
-
if (start_at < 0) {
|
1039
|
+
if (start_at < 0) {
|
1040
|
+
start_at += size + 1;
|
1041
|
+
if (start_at < 0) start_at = 0;
|
1042
|
+
}
|
1033
1043
|
else if (start_at == 0) { ++ start_at; }
|
1034
1044
|
|
1035
1045
|
if (start_at <= end_at)
|
data/ext/libsass/src/units.cpp
CHANGED
@@ -44,9 +44,9 @@ namespace Sass {
|
|
44
44
|
const double resolution_conversion_factors[3][3] =
|
45
45
|
{
|
46
46
|
/* dpi dpcm dppx */
|
47
|
-
/* dpi */ { 1, 2.54,
|
48
|
-
/* dpcm */ {
|
49
|
-
/* dppx */ {
|
47
|
+
/* dpi */ { 1, 1/2.54, 1/96.0 },
|
48
|
+
/* dpcm */ { 2.54, 1, 2.54/96 },
|
49
|
+
/* dppx */ { 96, 96/2.54, 1 }
|
50
50
|
};
|
51
51
|
|
52
52
|
UnitClass get_unit_type(UnitType unit)
|
data/lib/sassc/version.rb
CHANGED
data/test/native_test.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Boland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|