sass 3.1.0.alpha.49 → 3.1.0.alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/sass/tree/visitors/cssize.rb +3 -2
- data/test/sass/engine_test.rb +179 -169
- metadata +3 -3
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.0.alpha.
|
1
|
+
3.1.0.alpha.50
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.0.alpha.
|
1
|
+
3.1.0.alpha.50
|
@@ -144,12 +144,13 @@ class Sass::Tree::Visitors::Cssize < Sass::Tree::Visitors::Base
|
|
144
144
|
|
145
145
|
yield
|
146
146
|
|
147
|
+
result = node.children.dup
|
147
148
|
if !node.resolved_value.empty? || node.children.empty?
|
148
149
|
node.send(:check!)
|
149
|
-
|
150
|
+
result.unshift(node)
|
150
151
|
end
|
151
152
|
|
152
|
-
|
153
|
+
result
|
153
154
|
end
|
154
155
|
|
155
156
|
# Resolves parent references and nested selectors,
|
data/test/sass/engine_test.rb
CHANGED
@@ -2009,6 +2009,180 @@ WARN
|
|
2009
2009
|
end
|
2010
2010
|
end
|
2011
2011
|
|
2012
|
+
def test_media_bubbling
|
2013
|
+
assert_equal <<CSS, render(<<SASS)
|
2014
|
+
.foo {
|
2015
|
+
a: b; }
|
2016
|
+
@media bar {
|
2017
|
+
.foo {
|
2018
|
+
c: d; } }
|
2019
|
+
.foo .baz {
|
2020
|
+
e: f; }
|
2021
|
+
@media bip {
|
2022
|
+
.foo .baz {
|
2023
|
+
g: h; } }
|
2024
|
+
|
2025
|
+
.other {
|
2026
|
+
i: j; }
|
2027
|
+
CSS
|
2028
|
+
.foo
|
2029
|
+
a: b
|
2030
|
+
@media bar
|
2031
|
+
c: d
|
2032
|
+
.baz
|
2033
|
+
e: f
|
2034
|
+
@media bip
|
2035
|
+
g: h
|
2036
|
+
|
2037
|
+
.other
|
2038
|
+
i: j
|
2039
|
+
SASS
|
2040
|
+
|
2041
|
+
assert_equal <<CSS, render(<<SASS, :style => :compact)
|
2042
|
+
.foo { a: b; }
|
2043
|
+
@media bar { .foo { c: d; } }
|
2044
|
+
.foo .baz { e: f; }
|
2045
|
+
@media bip { .foo .baz { g: h; } }
|
2046
|
+
|
2047
|
+
.other { i: j; }
|
2048
|
+
CSS
|
2049
|
+
.foo
|
2050
|
+
a: b
|
2051
|
+
@media bar
|
2052
|
+
c: d
|
2053
|
+
.baz
|
2054
|
+
e: f
|
2055
|
+
@media bip
|
2056
|
+
g: h
|
2057
|
+
|
2058
|
+
.other
|
2059
|
+
i: j
|
2060
|
+
SASS
|
2061
|
+
|
2062
|
+
assert_equal <<CSS, render(<<SASS, :style => :expanded)
|
2063
|
+
.foo {
|
2064
|
+
a: b;
|
2065
|
+
}
|
2066
|
+
@media bar {
|
2067
|
+
.foo {
|
2068
|
+
c: d;
|
2069
|
+
}
|
2070
|
+
}
|
2071
|
+
.foo .baz {
|
2072
|
+
e: f;
|
2073
|
+
}
|
2074
|
+
@media bip {
|
2075
|
+
.foo .baz {
|
2076
|
+
g: h;
|
2077
|
+
}
|
2078
|
+
}
|
2079
|
+
|
2080
|
+
.other {
|
2081
|
+
i: j;
|
2082
|
+
}
|
2083
|
+
CSS
|
2084
|
+
.foo
|
2085
|
+
a: b
|
2086
|
+
@media bar
|
2087
|
+
c: d
|
2088
|
+
.baz
|
2089
|
+
e: f
|
2090
|
+
@media bip
|
2091
|
+
g: h
|
2092
|
+
|
2093
|
+
.other
|
2094
|
+
i: j
|
2095
|
+
SASS
|
2096
|
+
end
|
2097
|
+
|
2098
|
+
def test_double_media_bubbling
|
2099
|
+
assert_equal <<CSS, render(<<SASS)
|
2100
|
+
@media bar and baz {
|
2101
|
+
.foo {
|
2102
|
+
c: d; } }
|
2103
|
+
CSS
|
2104
|
+
@media bar
|
2105
|
+
@media baz
|
2106
|
+
.foo
|
2107
|
+
c: d
|
2108
|
+
SASS
|
2109
|
+
|
2110
|
+
assert_equal <<CSS, render(<<SASS)
|
2111
|
+
@media bar {
|
2112
|
+
.foo {
|
2113
|
+
a: b; } }
|
2114
|
+
@media bar and baz {
|
2115
|
+
.foo {
|
2116
|
+
c: d; } }
|
2117
|
+
CSS
|
2118
|
+
.foo
|
2119
|
+
@media bar
|
2120
|
+
a: b
|
2121
|
+
@media baz
|
2122
|
+
c: d
|
2123
|
+
SASS
|
2124
|
+
end
|
2125
|
+
|
2126
|
+
def test_rule_media_rule_bubbling
|
2127
|
+
assert_equal <<CSS, render(<<SASS)
|
2128
|
+
@media bar {
|
2129
|
+
.foo {
|
2130
|
+
a: b;
|
2131
|
+
e: f; }
|
2132
|
+
.foo .baz {
|
2133
|
+
c: d; } }
|
2134
|
+
CSS
|
2135
|
+
.foo
|
2136
|
+
@media bar
|
2137
|
+
a: b
|
2138
|
+
.baz
|
2139
|
+
c: d
|
2140
|
+
e: f
|
2141
|
+
SASS
|
2142
|
+
end
|
2143
|
+
|
2144
|
+
def test_nested_media_around_properties
|
2145
|
+
assert_equal <<CSS, render(<<SASS)
|
2146
|
+
.outside {
|
2147
|
+
color: red;
|
2148
|
+
background: blue; }
|
2149
|
+
@media print {
|
2150
|
+
.outside {
|
2151
|
+
color: black; } }
|
2152
|
+
@media print and nested {
|
2153
|
+
.outside .inside {
|
2154
|
+
border: 1px solid black; } }
|
2155
|
+
.outside .middle {
|
2156
|
+
display: block; }
|
2157
|
+
CSS
|
2158
|
+
.outside
|
2159
|
+
color: red
|
2160
|
+
@media print
|
2161
|
+
color: black
|
2162
|
+
.inside
|
2163
|
+
@media nested
|
2164
|
+
border: 1px solid black
|
2165
|
+
background: blue
|
2166
|
+
.middle
|
2167
|
+
display: block
|
2168
|
+
SASS
|
2169
|
+
end
|
2170
|
+
|
2171
|
+
def test_media_with_parent_references
|
2172
|
+
sass_str = <<SASS
|
2173
|
+
.outside
|
2174
|
+
@media print
|
2175
|
+
&.inside
|
2176
|
+
border: 1px solid black
|
2177
|
+
SASS
|
2178
|
+
css_str = <<CSS
|
2179
|
+
@media print {
|
2180
|
+
.outside.inside {
|
2181
|
+
border: 1px solid black; } }
|
2182
|
+
CSS
|
2183
|
+
assert_equal css_str, render(sass_str)
|
2184
|
+
end
|
2185
|
+
|
2012
2186
|
# Regression tests
|
2013
2187
|
|
2014
2188
|
def test_parens_in_mixins
|
@@ -2247,178 +2421,14 @@ foo
|
|
2247
2421
|
SASS
|
2248
2422
|
end
|
2249
2423
|
|
2250
|
-
def
|
2251
|
-
assert_equal <<CSS, render(<<SASS)
|
2252
|
-
.foo {
|
2253
|
-
a: b; }
|
2254
|
-
@media bar {
|
2255
|
-
.foo {
|
2256
|
-
c: d; } }
|
2257
|
-
.foo .baz {
|
2258
|
-
e: f; }
|
2259
|
-
@media bip {
|
2260
|
-
.foo .baz {
|
2261
|
-
g: h; } }
|
2262
|
-
|
2263
|
-
.other {
|
2264
|
-
i: j; }
|
2265
|
-
CSS
|
2266
|
-
.foo
|
2267
|
-
a: b
|
2268
|
-
@media bar
|
2269
|
-
c: d
|
2270
|
-
.baz
|
2271
|
-
e: f
|
2272
|
-
@media bip
|
2273
|
-
g: h
|
2274
|
-
|
2275
|
-
.other
|
2276
|
-
i: j
|
2277
|
-
SASS
|
2278
|
-
|
2279
|
-
assert_equal <<CSS, render(<<SASS, :style => :compact)
|
2280
|
-
.foo { a: b; }
|
2281
|
-
@media bar { .foo { c: d; } }
|
2282
|
-
.foo .baz { e: f; }
|
2283
|
-
@media bip { .foo .baz { g: h; } }
|
2284
|
-
|
2285
|
-
.other { i: j; }
|
2286
|
-
CSS
|
2287
|
-
.foo
|
2288
|
-
a: b
|
2289
|
-
@media bar
|
2290
|
-
c: d
|
2291
|
-
.baz
|
2292
|
-
e: f
|
2293
|
-
@media bip
|
2294
|
-
g: h
|
2295
|
-
|
2296
|
-
.other
|
2297
|
-
i: j
|
2298
|
-
SASS
|
2299
|
-
|
2300
|
-
assert_equal <<CSS, render(<<SASS, :style => :expanded)
|
2301
|
-
.foo {
|
2302
|
-
a: b;
|
2303
|
-
}
|
2304
|
-
@media bar {
|
2305
|
-
.foo {
|
2306
|
-
c: d;
|
2307
|
-
}
|
2308
|
-
}
|
2309
|
-
.foo .baz {
|
2310
|
-
e: f;
|
2311
|
-
}
|
2312
|
-
@media bip {
|
2313
|
-
.foo .baz {
|
2314
|
-
g: h;
|
2315
|
-
}
|
2316
|
-
}
|
2317
|
-
|
2318
|
-
.other {
|
2319
|
-
i: j;
|
2320
|
-
}
|
2321
|
-
CSS
|
2322
|
-
.foo
|
2323
|
-
a: b
|
2324
|
-
@media bar
|
2325
|
-
c: d
|
2326
|
-
.baz
|
2327
|
-
e: f
|
2328
|
-
@media bip
|
2329
|
-
g: h
|
2330
|
-
|
2331
|
-
.other
|
2332
|
-
i: j
|
2333
|
-
SASS
|
2334
|
-
end
|
2335
|
-
|
2336
|
-
def test_double_media_bubbling
|
2337
|
-
assert_equal <<CSS, render(<<SASS)
|
2338
|
-
@media bar and baz {
|
2339
|
-
.foo {
|
2340
|
-
c: d; } }
|
2341
|
-
CSS
|
2342
|
-
@media bar
|
2343
|
-
@media baz
|
2344
|
-
.foo
|
2345
|
-
c: d
|
2346
|
-
SASS
|
2347
|
-
|
2348
|
-
assert_equal <<CSS, render(<<SASS)
|
2349
|
-
@media bar {
|
2350
|
-
.foo {
|
2351
|
-
a: b; } }
|
2352
|
-
@media bar and baz {
|
2353
|
-
.foo {
|
2354
|
-
c: d; } }
|
2355
|
-
CSS
|
2356
|
-
.foo
|
2357
|
-
@media bar
|
2358
|
-
a: b
|
2359
|
-
@media baz
|
2360
|
-
c: d
|
2361
|
-
SASS
|
2362
|
-
end
|
2363
|
-
|
2364
|
-
def test_rule_media_rule_bubbling
|
2365
|
-
assert_equal <<CSS, render(<<SASS)
|
2366
|
-
@media bar {
|
2367
|
-
.foo {
|
2368
|
-
a: b;
|
2369
|
-
e: f; }
|
2370
|
-
.foo .baz {
|
2371
|
-
c: d; } }
|
2372
|
-
CSS
|
2373
|
-
.foo
|
2374
|
-
@media bar
|
2375
|
-
a: b
|
2376
|
-
.baz
|
2377
|
-
c: d
|
2378
|
-
e: f
|
2379
|
-
SASS
|
2380
|
-
end
|
2381
|
-
|
2382
|
-
def test_nested_media_around_properties
|
2424
|
+
def test_unknown_directive
|
2383
2425
|
assert_equal <<CSS, render(<<SASS)
|
2384
|
-
|
2385
|
-
|
2386
|
-
background: blue; }
|
2387
|
-
@media print {
|
2388
|
-
.outside {
|
2389
|
-
color: black; } }
|
2390
|
-
@media print and nested {
|
2391
|
-
.outside .inside {
|
2392
|
-
border: 1px solid black; } }
|
2393
|
-
.outside .middle {
|
2394
|
-
display: block; }
|
2426
|
+
@baz {
|
2427
|
+
c: d; }
|
2395
2428
|
CSS
|
2396
|
-
|
2397
|
-
|
2398
|
-
@media print
|
2399
|
-
color: black
|
2400
|
-
.inside
|
2401
|
-
@media nested
|
2402
|
-
border: 1px solid black
|
2403
|
-
background: blue
|
2404
|
-
.middle
|
2405
|
-
display: block
|
2406
|
-
SASS
|
2407
|
-
end
|
2408
|
-
|
2409
|
-
def test_media_with_parent_references
|
2410
|
-
sass_str = <<SASS
|
2411
|
-
.outside
|
2412
|
-
@media print
|
2413
|
-
&.inside
|
2414
|
-
border: 1px solid black
|
2429
|
+
@baz
|
2430
|
+
c: d
|
2415
2431
|
SASS
|
2416
|
-
css_str = <<CSS
|
2417
|
-
@media print {
|
2418
|
-
.outside.inside {
|
2419
|
-
border: 1px solid black; } }
|
2420
|
-
CSS
|
2421
|
-
assert_equal css_str, render(sass_str)
|
2422
2432
|
end
|
2423
2433
|
|
2424
2434
|
# Encodings
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.alpha.
|
4
|
+
version: 3.1.0.alpha.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2010-12-
|
14
|
+
date: 2010-12-05 00:00:00 -05:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -124,9 +124,9 @@ files:
|
|
124
124
|
- lib/sass/tree/root_node.rb
|
125
125
|
- lib/sass/tree/rule_node.rb
|
126
126
|
- lib/sass/tree/warn_node.rb
|
127
|
-
- lib/sass/tree/each_node.rb
|
128
127
|
- lib/sass/tree/variable_node.rb
|
129
128
|
- lib/sass/tree/while_node.rb
|
129
|
+
- lib/sass/tree/each_node.rb
|
130
130
|
- lib/sass/tree/media_node.rb
|
131
131
|
- lib/sass/tree/visitors/base.rb
|
132
132
|
- lib/sass/tree/visitors/convert.rb
|