zweilove / css_splitter

Gem for splitting up stylesheets that go beyond the IE limit of 4095 selectors, for Rails 3.1+ apps using the Asset Pipeline.
MIT License
160 stars 47 forks source link

sass问题 #75

Open ZongDuCha opened 7 years ago

ZongDuCha commented 7 years ago

sass 错误代码: / Error: Invalid CSS after "": expected selector, was "{" on line 6 of sass/index.sass

1: $width:100% 2: 3: 4: $height:20px 5: 6: *{ 7: margin:0; 8: padding:0 9: }

Backtrace: sass/index.sass:6 C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/scss/parser.rb:1278:in expected' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/scss/parser.rb:1208:inexpected' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/scss/static_parser.rb:21:in parse_selector' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:438:invisit_rule' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/base.rb:36:in visit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:162:inblock in visit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/stack.rb:79:in block in with_base' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/stack.rb:135:inwith_frame' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/stack.rb:79:in with_base' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:162:invisit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/base.rb:52:in block in visit_children' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/base.rb:52:inmap' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/base.rb:52:in visit_children' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:171:inblock in visit_children' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:183:in with_environment' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:170:invisit_children' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/base.rb:36:in block in visit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:190:invisit_root' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/base.rb:36:in visit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:161:invisit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/visitors/perform.rb:10:in visit' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/root_node.rb:36:incss_tree' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/tree/root_node.rb:29:in render_with_sourcemap' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/engine.rb:389:in_render_with_sourcemap' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/engine.rb:307:in render_with_sourcemap' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/plugin/compiler.rb:462:inupdate_stylesheet' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/plugin/compiler.rb:215:in block in update_stylesheets' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/plugin/compiler.rb:209:ineach' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/plugin/compiler.rb:209:in update_stylesheets' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/plugin/compiler.rb:443:inon_file_changed' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-3.5.2/lib/sass/plugin/compiler.rb:320:in block in watch' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/config.rb:23:incall' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/processor.rb:115:in _process_changes' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/processor.rb:19:inblock in loop_for' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/processor.rb:15:in loop' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/processor.rb:15:inloop_for' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/loop.rb:84:in _wait_for_changes' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/event/loop.rb:42:inblock in setup' C:/Ruby24/lib/ruby/gems/2.4.0/gems/sass-listen-4.0.0/lib/sass-listen/internals/thread_pool.rb:6:in `block in add' / body:before { white-space: pre; font-family: monospace; content: "Error: Invalid CSS after \"\": expected selector, was \"{\"\A on line 6 of sass/index.sass\A \A 1: $width:100%\A 2: \A 3: \A 4: $height:20px\A 5: \A 6: *{\A 7: margin:0;\A 8: padding:0\A 9: }"; }

sass里的代码: $width:100%

$height:20px

*{ margin:0; padding:0 }

// 那位知道是什么原因吗?