sass 3.3.8 → 3.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +53 -45
- data/Rakefile +1 -4
- data/VERSION +1 -1
- data/VERSION_DATE +1 -1
- data/lib/sass/exec.rb +2 -2
- data/lib/sass/plugin/compiler.rb +4 -4
- data/lib/sass/tree/function_node.rb +4 -0
- data/lib/sass/tree/visitors/check_nesting.rb +33 -8
- data/lib/sass/util.rb +7 -2
- data/lib/sass/version.rb +5 -5
- data/test/sass/cache_test.rb +10 -10
- data/test/sass/engine_test.rb +6 -6
- data/test/sass/plugin_test.rb +2 -2
- data/test/sass/script_test.rb +11 -0
- data/test/sass/scss/css_test.rb +26 -0
- data/test/sass/scss/scss_test.rb +46 -0
- 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: 6f9d9c10c02b2d9ca11da7bdec51903de916be8c
|
4
|
+
data.tar.gz: 4dc07a5b37490d62d115fe63bff1d2008c18ab71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a141a1b9194aa86b15d752855f1ce5321509b12992837d111ffd2183ba98bb59b0cb7f2254ab977617bfd32deca1b80dbee81131e4e8c70ef03f5baa1869c4bc
|
7
|
+
data.tar.gz: dfb009a5f9716c38da33dd4ecb67d9644bfdf07c4f60a3901e1ce0bc2b3be8d49b9a7d328df6824693aba190352198baec7faba722b3a73430432ebc19a13605
|
data/README.md
CHANGED
@@ -49,8 +49,10 @@ see [the Sass reference](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.ht
|
|
49
49
|
Sass can also be used with any Rack-enabled web framework.
|
50
50
|
To do so, just add
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
```ruby
|
53
|
+
require 'sass/plugin/rack'
|
54
|
+
use Sass::Plugin::Rack
|
55
|
+
```
|
54
56
|
|
55
57
|
to `config.ru`.
|
56
58
|
Then any Sass files in `public/stylesheets/sass`
|
@@ -93,18 +95,20 @@ put them in a file called `test.scss` and run `sass test.scss`.
|
|
93
95
|
Sass avoids repetition by nesting selectors within one another.
|
94
96
|
The same thing works for properties.
|
95
97
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
98
|
+
```scss
|
99
|
+
table.hl {
|
100
|
+
margin: 2em 0;
|
101
|
+
td.ln { text-align: right; }
|
102
|
+
}
|
103
|
+
|
104
|
+
li {
|
105
|
+
font: {
|
106
|
+
family: serif;
|
107
|
+
weight: bold;
|
108
|
+
size: 1.2em;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
```
|
108
112
|
|
109
113
|
### Variables
|
110
114
|
|
@@ -112,19 +116,21 @@ Use the same color all over the place?
|
|
112
116
|
Need to do some math with height and width and text size?
|
113
117
|
Sass supports variables, math operations, and many useful functions.
|
114
118
|
|
115
|
-
|
116
|
-
|
119
|
+
```scss
|
120
|
+
$blue: #3bbfce;
|
121
|
+
$margin: 16px;
|
117
122
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
123
|
+
.content_navigation {
|
124
|
+
border-color: $blue;
|
125
|
+
color: darken($blue, 10%);
|
126
|
+
}
|
122
127
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
+
.border {
|
129
|
+
padding: $margin / 2;
|
130
|
+
margin: $margin / 2;
|
131
|
+
border-color: $blue;
|
132
|
+
}
|
133
|
+
```
|
128
134
|
|
129
135
|
### Mixins
|
130
136
|
|
@@ -133,23 +139,25 @@ mixins allow you to re-use whole chunks of CSS,
|
|
133
139
|
properties or selectors.
|
134
140
|
You can even give them arguments.
|
135
141
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
142
|
+
```scss
|
143
|
+
@mixin table-scaffolding {
|
144
|
+
th {
|
145
|
+
text-align: center;
|
146
|
+
font-weight: bold;
|
147
|
+
}
|
148
|
+
td, th { padding: 2px; }
|
149
|
+
}
|
150
|
+
|
151
|
+
@mixin left($dist) {
|
152
|
+
float: left;
|
153
|
+
margin-left: $dist;
|
154
|
+
}
|
155
|
+
|
156
|
+
#data {
|
157
|
+
@include left(10px);
|
158
|
+
@include table-scaffolding;
|
159
|
+
}
|
160
|
+
```
|
153
161
|
|
154
162
|
A comprehensive list of features is available
|
155
163
|
in the [Sass reference](http://sass-lang.com/documentation/file.SASS_REFERENCE.html).
|
@@ -202,9 +210,9 @@ task for a boy-genius). Nathan lives in Seattle, Washington and works on
|
|
202
210
|
Sass and the creator of Compass, the first Sass-based framework. Chris focuses
|
203
211
|
on making Sass more powerful, easy to use, and on ways to speed its adoption
|
204
212
|
through the web development community. Chris lives in San Jose, California with
|
205
|
-
his wife and daughter. He is
|
206
|
-
[
|
207
|
-
|
213
|
+
his wife and daughter. He is an Engineer for
|
214
|
+
[LinkedIn.com](http://linkedin.com), where one of his responsibilities is to
|
215
|
+
maintain Sass & Compass.
|
208
216
|
|
209
217
|
If you use this software, you must pay Hampton a compliment. And
|
210
218
|
buy Nathan some jelly beans. Maybe pet a kitten. Yeah. Pet that kitty.
|
data/Rakefile
CHANGED
@@ -102,12 +102,10 @@ task :install => [:package] do
|
|
102
102
|
sh %{#{'sudo ' if ENV["SUDO"]}#{gem} install --no-ri pkg/sass-#{get_version}}
|
103
103
|
end
|
104
104
|
|
105
|
-
desc "Release a new Sass package to
|
105
|
+
desc "Release a new Sass package to RubyGems.org."
|
106
106
|
task :release => [:check_release, :package] do
|
107
107
|
name = File.read(scope("VERSION_NAME")).strip
|
108
108
|
version = File.read(scope("VERSION")).strip
|
109
|
-
sh %{rubyforge add_release sass sass "#{name} (v#{version})" pkg/sass-#{version}.gem}
|
110
|
-
sh %{rubyforge add_file sass sass "#{name} (v#{version})" pkg/sass-#{version}.tar.gz}
|
111
109
|
sh %{gem push pkg/sass-#{version}.gem}
|
112
110
|
end
|
113
111
|
|
@@ -166,7 +164,6 @@ task :release_edge do
|
|
166
164
|
next
|
167
165
|
end
|
168
166
|
|
169
|
-
sh %{rubyforge add_release sass sass "Bleeding Edge (v#{version})" pkg/sass-#{version}.gem}
|
170
167
|
sh %{gem push pkg/sass-#{version}.gem}
|
171
168
|
end
|
172
169
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.9
|
data/VERSION_DATE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
28 June 2014 00:25:14 UTC
|
data/lib/sass/exec.rb
CHANGED
@@ -682,7 +682,7 @@ END
|
|
682
682
|
unless File.directory?(@options[:input])
|
683
683
|
raise "Error: '#{@options[:input]}' is not a directory"
|
684
684
|
end
|
685
|
-
if @options[:output] && File.
|
685
|
+
if @options[:output] && File.exist?(@options[:output]) &&
|
686
686
|
!File.directory?(@options[:output])
|
687
687
|
raise "Error: '#{@options[:output]}' is not a directory"
|
688
688
|
end
|
@@ -711,7 +711,7 @@ END
|
|
711
711
|
FileUtils.mkdir_p(File.dirname(output))
|
712
712
|
end
|
713
713
|
puts_action :convert, :green, f
|
714
|
-
if File.
|
714
|
+
if File.exist?(output)
|
715
715
|
puts_action :overwrite, :yellow, output
|
716
716
|
else
|
717
717
|
puts_action :create, :green, output
|
data/lib/sass/plugin/compiler.rb
CHANGED
@@ -353,14 +353,14 @@ module Sass::Plugin
|
|
353
353
|
if recompile_required
|
354
354
|
# In case a file we're watching is removed and then recreated we
|
355
355
|
# prune out the non-existant files here.
|
356
|
-
watched_files_remaining = individual_files.select {|(source, _, _)| File.
|
356
|
+
watched_files_remaining = individual_files.select {|(source, _, _)| File.exist?(source)}
|
357
357
|
update_stylesheets(watched_files_remaining)
|
358
358
|
end
|
359
359
|
end
|
360
360
|
|
361
361
|
def update_stylesheet(filename, css, sourcemap)
|
362
362
|
dir = File.dirname(css)
|
363
|
-
unless File.
|
363
|
+
unless File.exist?(dir)
|
364
364
|
run_creating_directory dir
|
365
365
|
FileUtils.mkdir_p dir
|
366
366
|
end
|
@@ -400,12 +400,12 @@ module Sass::Plugin
|
|
400
400
|
end
|
401
401
|
|
402
402
|
def try_delete_css(css)
|
403
|
-
if File.
|
403
|
+
if File.exist?(css)
|
404
404
|
run_deleting_css css
|
405
405
|
File.delete css
|
406
406
|
end
|
407
407
|
map = Sass::Util.sourcemap_name(css)
|
408
|
-
if File.
|
408
|
+
if File.exist?(map)
|
409
409
|
run_deleting_sourcemap map
|
410
410
|
File.delete map
|
411
411
|
end
|
@@ -23,17 +23,34 @@ class Sass::Tree::Visitors::CheckNesting < Sass::Tree::Visitors::Base
|
|
23
23
|
SCRIPT_NODES = [Sass::Tree::ImportNode] + CONTROL_NODES
|
24
24
|
def visit_children(parent)
|
25
25
|
old_parent = @parent
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
26
|
+
|
27
|
+
# When checking a static tree, resolve at-roots to be sure they won't send
|
28
|
+
# nodes where they don't belong.
|
29
|
+
if parent.is_a?(Sass::Tree::AtRootNode) && parent.resolved_value
|
30
|
+
old_parents = @parents
|
31
|
+
@parents = @parents.reject {|p| parent.exclude_node?(p)}
|
32
|
+
@parent = Sass::Util.enum_with_index(@parents.reverse).
|
33
|
+
find {|p, i| !transparent_parent?(p, @parents[-i - 2])}.first
|
34
|
+
|
35
|
+
begin
|
36
|
+
return super
|
37
|
+
ensure
|
38
|
+
@parents = old_parents
|
39
|
+
@parent = old_parent
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
unless transparent_parent?(parent, old_parent)
|
30
44
|
@parent = parent
|
31
45
|
end
|
46
|
+
|
32
47
|
@parents.push parent
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
48
|
+
begin
|
49
|
+
super
|
50
|
+
ensure
|
51
|
+
@parent = old_parent
|
52
|
+
@parents.pop
|
53
|
+
end
|
37
54
|
end
|
38
55
|
|
39
56
|
def visit_root(node)
|
@@ -139,6 +156,14 @@ class Sass::Tree::Visitors::CheckNesting < Sass::Tree::Visitors::Base
|
|
139
156
|
|
140
157
|
private
|
141
158
|
|
159
|
+
# Whether `parent` should be assigned to `@parent`.
|
160
|
+
def transparent_parent?(parent, grandparent)
|
161
|
+
is_any_of?(parent, SCRIPT_NODES) ||
|
162
|
+
(parent.bubbles? &&
|
163
|
+
!grandparent.is_a?(Sass::Tree::RootNode) &&
|
164
|
+
!grandparent.is_a?(Sass::Tree::AtRootNode))
|
165
|
+
end
|
166
|
+
|
142
167
|
def is_any_of?(val, classes)
|
143
168
|
classes.each do |c|
|
144
169
|
return true if val.is_a?(c)
|
data/lib/sass/util.rb
CHANGED
@@ -1199,7 +1199,12 @@ MSG
|
|
1199
1199
|
result = yield tmpfile
|
1200
1200
|
tmpfile.close
|
1201
1201
|
ATOMIC_WRITE_MUTEX.synchronize do
|
1202
|
-
|
1202
|
+
begin
|
1203
|
+
File.chmod(perms & ~File.umask, tmpfile.path)
|
1204
|
+
rescue Errno::EPERM
|
1205
|
+
# If we don't have permissions to chmod the file, don't let that crash
|
1206
|
+
# the compilation. See issue 1215.
|
1207
|
+
end
|
1203
1208
|
File.rename tmpfile.path, filename
|
1204
1209
|
end
|
1205
1210
|
result
|
@@ -1237,7 +1242,7 @@ MSG
|
|
1237
1242
|
rescue LoadError => e
|
1238
1243
|
dir = scope("vendor/listen/lib")
|
1239
1244
|
if $LOAD_PATH.include?(dir)
|
1240
|
-
raise e unless File.
|
1245
|
+
raise e unless File.exist?(scope(".git"))
|
1241
1246
|
e.message << "\n" <<
|
1242
1247
|
'Run "git submodule update --init" to get the bundled version.'
|
1243
1248
|
else
|
data/lib/sass/version.rb
CHANGED
@@ -85,20 +85,20 @@ module Sass
|
|
85
85
|
private
|
86
86
|
|
87
87
|
def revision_number
|
88
|
-
if File.
|
88
|
+
if File.exist?(Sass::Util.scope('REVISION'))
|
89
89
|
rev = File.read(Sass::Util.scope('REVISION')).strip
|
90
90
|
return rev unless rev =~ /^([a-f0-9]+|\(.*\))$/ || rev == '(unknown)'
|
91
91
|
end
|
92
92
|
|
93
|
-
return unless File.
|
93
|
+
return unless File.exist?(Sass::Util.scope('.git/HEAD'))
|
94
94
|
rev = File.read(Sass::Util.scope('.git/HEAD')).strip
|
95
95
|
return rev unless rev =~ /^ref: (.*)$/
|
96
96
|
|
97
97
|
ref_name = $1
|
98
98
|
ref_file = Sass::Util.scope(".git/#{ref_name}")
|
99
99
|
info_file = Sass::Util.scope(".git/info/refs")
|
100
|
-
return File.read(ref_file).strip if File.
|
101
|
-
return unless File.
|
100
|
+
return File.read(ref_file).strip if File.exist?(ref_file)
|
101
|
+
return unless File.exist?(info_file)
|
102
102
|
File.open(info_file) do |f|
|
103
103
|
f.each do |l|
|
104
104
|
sha, ref = l.strip.split("\t", 2)
|
@@ -110,7 +110,7 @@ module Sass
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def version_date
|
113
|
-
return unless File.
|
113
|
+
return unless File.exist?(Sass::Util.scope('VERSION_DATE'))
|
114
114
|
DateTime.parse(File.read(Sass::Util.scope('VERSION_DATE')).strip)
|
115
115
|
end
|
116
116
|
end
|
data/test/sass/cache_test.rb
CHANGED
@@ -18,42 +18,42 @@ class CacheTest < Test::Unit::TestCase
|
|
18
18
|
def test_file_cache_writes_a_file
|
19
19
|
file_store = Sass::CacheStores::Filesystem.new(@@cache_dir)
|
20
20
|
file_store.store("asdf/foo.scssc", "fakesha1", root_node)
|
21
|
-
assert File.
|
21
|
+
assert File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_file_cache_reads_a_file
|
25
25
|
file_store = Sass::CacheStores::Filesystem.new(@@cache_dir)
|
26
|
-
assert !File.
|
26
|
+
assert !File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
27
27
|
file_store.store("asdf/foo.scssc", "fakesha1", root_node)
|
28
|
-
assert File.
|
28
|
+
assert File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
29
29
|
assert_kind_of Sass::Tree::RootNode, file_store.retrieve("asdf/foo.scssc", "fakesha1")
|
30
30
|
end
|
31
31
|
|
32
32
|
def test_file_cache_miss_returns_nil
|
33
33
|
file_store = Sass::CacheStores::Filesystem.new(@@cache_dir)
|
34
|
-
assert !File.
|
34
|
+
assert !File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
35
35
|
assert_nil file_store.retrieve("asdf/foo.scssc", "fakesha1")
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_sha_change_invalidates_cache_and_cleans_up
|
39
39
|
file_store = Sass::CacheStores::Filesystem.new(@@cache_dir)
|
40
|
-
assert !File.
|
40
|
+
assert !File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
41
41
|
file_store.store("asdf/foo.scssc", "fakesha1", root_node)
|
42
|
-
assert File.
|
42
|
+
assert File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
43
43
|
assert_nil file_store.retrieve("asdf/foo.scssc", "differentsha1")
|
44
|
-
assert !File.
|
44
|
+
assert !File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
45
45
|
end
|
46
46
|
|
47
47
|
def test_version_change_invalidates_cache_and_cleans_up
|
48
48
|
file_store = Sass::CacheStores::Filesystem.new(@@cache_dir)
|
49
|
-
assert !File.
|
49
|
+
assert !File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
50
50
|
file_store.store("asdf/foo.scssc", "fakesha1", root_node)
|
51
|
-
assert File.
|
51
|
+
assert File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
52
52
|
real_version = Sass::VERSION
|
53
53
|
begin
|
54
54
|
Sass::VERSION.replace("a different version")
|
55
55
|
assert_nil file_store.retrieve("asdf/foo.scssc", "fakesha1")
|
56
|
-
assert !File.
|
56
|
+
assert !File.exist?("#{@@cache_dir}/asdf/foo.scssc")
|
57
57
|
ensure
|
58
58
|
Sass::VERSION.replace(real_version)
|
59
59
|
end
|
data/test/sass/engine_test.rb
CHANGED
@@ -648,18 +648,18 @@ SASS
|
|
648
648
|
|
649
649
|
def test_sass_import
|
650
650
|
sassc_file = sassc_path("importee")
|
651
|
-
assert !File.
|
651
|
+
assert !File.exist?(sassc_file)
|
652
652
|
renders_correctly "import", { :style => :compact, :load_paths => [File.dirname(__FILE__) + "/templates"] }
|
653
|
-
assert File.
|
653
|
+
assert File.exist?(sassc_file)
|
654
654
|
end
|
655
655
|
|
656
656
|
def test_sass_pathname_import
|
657
657
|
sassc_file = sassc_path("importee")
|
658
|
-
assert !File.
|
658
|
+
assert !File.exist?(sassc_file)
|
659
659
|
renders_correctly("import",
|
660
660
|
:style => :compact,
|
661
661
|
:load_paths => [Pathname.new(File.dirname(__FILE__) + "/templates")])
|
662
|
-
assert File.
|
662
|
+
assert File.exist?(sassc_file)
|
663
663
|
end
|
664
664
|
|
665
665
|
def test_import_from_global_load_paths
|
@@ -691,12 +691,12 @@ ERR
|
|
691
691
|
end
|
692
692
|
|
693
693
|
def test_no_cache
|
694
|
-
assert !File.
|
694
|
+
assert !File.exist?(sassc_path("importee"))
|
695
695
|
renders_correctly("import", {
|
696
696
|
:style => :compact, :cache => false,
|
697
697
|
:load_paths => [File.dirname(__FILE__) + "/templates"],
|
698
698
|
})
|
699
|
-
assert !File.
|
699
|
+
assert !File.exist?(sassc_path("importee"))
|
700
700
|
end
|
701
701
|
|
702
702
|
def test_import_in_rule
|
data/test/sass/plugin_test.rb
CHANGED
@@ -209,7 +209,7 @@ CSS
|
|
209
209
|
end
|
210
210
|
|
211
211
|
def test_doesnt_render_partials
|
212
|
-
assert !File.
|
212
|
+
assert !File.exist?(tempfile_loc('_partial'))
|
213
213
|
end
|
214
214
|
|
215
215
|
def test_template_location_array
|
@@ -507,7 +507,7 @@ WARNING
|
|
507
507
|
def template_loc(name = nil, prefix = nil)
|
508
508
|
if name
|
509
509
|
scss = absolutize "#{prefix}templates/#{name}.scss"
|
510
|
-
File.
|
510
|
+
File.exist?(scss) ? scss : absolutize("#{prefix}templates/#{name}.sass")
|
511
511
|
else
|
512
512
|
absolutize "#{prefix}templates"
|
513
513
|
end
|
data/test/sass/script_test.rb
CHANGED
@@ -741,6 +741,17 @@ end
|
|
741
741
|
assert_equal "teal\\+bang(12)", resolve("teal\\+bang(12)")
|
742
742
|
end
|
743
743
|
|
744
|
+
def test_and_or_not_disallowed_as_function_names
|
745
|
+
%w[and or not].each do |name|
|
746
|
+
assert_raise_message(Sass::SyntaxError, "Invalid function name \"#{name}\".") do
|
747
|
+
render(<<SASS)
|
748
|
+
@function #{name}()
|
749
|
+
@return null
|
750
|
+
SASS
|
751
|
+
end
|
752
|
+
end
|
753
|
+
end
|
754
|
+
|
744
755
|
def test_interpolation_after_hash
|
745
756
|
assert_equal "#2", resolve('"##{1 + 1}"')
|
746
757
|
end
|
data/test/sass/scss/css_test.rb
CHANGED
@@ -653,6 +653,32 @@ CSS
|
|
653
653
|
SCSS
|
654
654
|
end
|
655
655
|
|
656
|
+
def test_keyframes
|
657
|
+
assert_equal <<CSS, render(<<SCSS)
|
658
|
+
@keyframes identifier {
|
659
|
+
0% {
|
660
|
+
top: 0;
|
661
|
+
left: 0; }
|
662
|
+
|
663
|
+
30% {
|
664
|
+
top: 50px; }
|
665
|
+
|
666
|
+
68%, 72% {
|
667
|
+
left: 50px; }
|
668
|
+
|
669
|
+
100% {
|
670
|
+
top: 100px;
|
671
|
+
left: 100%; } }
|
672
|
+
CSS
|
673
|
+
@keyframes identifier {
|
674
|
+
0% {top: 0; left: 0}
|
675
|
+
30% {top: 50px}
|
676
|
+
68%, 72% {left: 50px}
|
677
|
+
100% {top: 100px; left: 100%}
|
678
|
+
}
|
679
|
+
SCSS
|
680
|
+
end
|
681
|
+
|
656
682
|
## Selectors
|
657
683
|
|
658
684
|
# Taken from http://dev.w3.org/csswg/selectors4/#overview
|
data/test/sass/scss/scss_test.rb
CHANGED
@@ -903,6 +903,36 @@ CSS
|
|
903
903
|
SCSS
|
904
904
|
end
|
905
905
|
|
906
|
+
def test_keyframes_rules_in_content
|
907
|
+
assert_equal <<CSS, render(<<SCSS)
|
908
|
+
@keyframes identifier {
|
909
|
+
0% {
|
910
|
+
top: 0;
|
911
|
+
left: 0; }
|
912
|
+
|
913
|
+
30% {
|
914
|
+
top: 50px; }
|
915
|
+
|
916
|
+
68%, 72% {
|
917
|
+
left: 50px; }
|
918
|
+
|
919
|
+
100% {
|
920
|
+
top: 100px;
|
921
|
+
left: 100%; } }
|
922
|
+
CSS
|
923
|
+
@mixin keyframes {
|
924
|
+
@keyframes identifier { @content }
|
925
|
+
}
|
926
|
+
|
927
|
+
@include keyframes {
|
928
|
+
0% {top: 0; left: 0}
|
929
|
+
30% {top: 50px}
|
930
|
+
68%, 72% {left: 50px}
|
931
|
+
100% {top: 100px; left: 100%}
|
932
|
+
}
|
933
|
+
SCSS
|
934
|
+
end
|
935
|
+
|
906
936
|
## Functions
|
907
937
|
|
908
938
|
def test_basic_function
|
@@ -2848,6 +2878,22 @@ CSS
|
|
2848
2878
|
SCSS
|
2849
2879
|
end
|
2850
2880
|
|
2881
|
+
# See https://github.com/sass/sass/issues/1294
|
2882
|
+
def test_extend_top_leveled_by_at_root
|
2883
|
+
render(<<SCSS)
|
2884
|
+
.span-10 {
|
2885
|
+
@at-root (without: all) {
|
2886
|
+
@extend %column;
|
2887
|
+
}
|
2888
|
+
}
|
2889
|
+
SCSS
|
2890
|
+
|
2891
|
+
assert(false, "Expected syntax error")
|
2892
|
+
rescue Sass::SyntaxError => e
|
2893
|
+
assert_equal "Extend directives may only be used within rules.", e.message
|
2894
|
+
assert_equal 3, e.sass_line
|
2895
|
+
end
|
2896
|
+
|
2851
2897
|
def test_at_root_doesnt_always_break_blocks
|
2852
2898
|
assert_equal <<CSS, render(<<SCSS)
|
2853
2899
|
.foo {
|
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.3.
|
4
|
+
version: 3.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-06-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yard
|