Nathan-- Here's my test case:
--- test.sass --- !background_color = #5d3526 !content_background = #1B1718 .foo :border= 1px !background_color solid --- output --- /* NoMethodError: undefined method `!background_color' for #<Sass::Constant::String:0x34606d8 @value="1px"> Backtrace: /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ constant/operation.rb:23:in `send' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ constant/operation.rb:23:in `perform' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ constant/operation.rb:14:in `to_s' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ constant.rb:44:in `parse' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ engine.rb:158:in `parse_attribute' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ engine.rb:138:in `parse_line' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ engine.rb:113:in `build_tree' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ engine.rb:121:in `build_tree' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ engine.rb:54:in `render' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ plugin.rb:53:in `update_stylesheets' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ plugin.rb:41:in `each' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/lib/sass/ plugin.rb:41:in `update_stylesheets' /Users/mymacbook/rails/ocilac/config/../vendor/plugins/haml/init.rb: 7:in `load_plugin' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:400:in `load_plugin' /Users/mymacbook/rails/ocilac/config/../vendor/rails/activerecord/ lib/../../activesupport/lib/active_support/core_ext/kernel/ reporting.rb:11:in `silence_warnings' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:400:in `load_plugin' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:185:in `load_plugins' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:185:in `each' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:185:in `load_plugins' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:105:in `process' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:43:in `send' /Users/mymacbook/rails/ocilac/config/../vendor/rails/railties/lib/ initializer.rb:43:in `run' /Users/mymacbook/rails/ocilac/config/environment.rb:13 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ rails.rb:161:in `rails' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails: 112:in `cloaker_' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:134:in `call' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:134:in `listener' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails: 98:in `cloaker_' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:51:in `call' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ configurator.rb:51:in `initialize' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails: 85:in `new' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails: 85:in `run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/lib/mongrel/ command.rb:211:in `run' /opt/local/lib/ruby/gems/1.8/gems/mongrel-0.3.13.4/bin/mongrel_rails:231 /opt/local/bin/mongrel_rails:16:in `load' /opt/local/bin/mongrel_rails:16 */ On Feb 10, 2007, at 11:10 PM, Nathan Weizenbaum wrote: > > Steve: It's the weirdest thing... I was able to reproduce your > error for > a little while, but now I can't. Try restarting your server, I > guess... > if that doesn't work, present me the smallest possible case in > which the > error occurs. > > Evgeny: This is a separate bug - a bad Regex is causing "14em solid > " to > be parsed as the number 14 with the units "em solid ". I'll fix > this in > a second. > > - Nathan > > Evgeny wrote: >> Have been experiencing this problem myself, >> especially with the border property -- because of how the color comes >> last in there. >> >> :border-right= "14em solid " + !color_high >> >> This renders correctly on my mac. But a partner of mine used linux >> and >> windows, and his css files had only >> >> border-right: #ccccff; >> >> Without the 14em and solid properties at all. >> >> >> >> Please fix! :) >> >> On 2/10/07, *s.ross* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> >> wrote: >> >> >> Did you check this in to: >> >> http://svn.hamptoncatlin.com/haml/trunk >> >> ? >> >> I tried this: >> >> !code_background= #211d20 >> !code_border= #312d30 >> >> pre >> :padding 4px >> :background= !code_background >> :border= 1px solid !code_border >> code >> :background transparent >> >> And the stylesheet generated shows: >> >> /* >> NoMethodError: undefined method `solid' for >> #<Sass::Constant::String: >> 0x3511334 @value="1px"> >> ...<snip>... >> >> Moving !code_border to be the first variable token on the line >> doesn't help. >> >> Thoughts? >> >> >> On Feb 9, 2007, at 9:20 PM, Nathan Weizenbaum wrote: >> >>> >>> Hello, fellow Hamlites! >>> >>> Today I wanted to showcase a new feature that's hot of the presses >>> (or, >>> rather, hard disk, I suppose). It's an addition to Sass' constant >>> arithmetic capabilities. If you're not familiar with Sass, it's a >>> Haml-like language for defining CSS using indentation and nested CSS >>> rules - there's a whole Sneak Peak on it in the archives. It also >>> allows >>> you to define constants and perform arithmetic on them, like so: >>> >>> !border_style= dotted >>> !main_color= #5588ee >>> >>> #main >>> :background-color= !main_color >>> :border= "2px " + !border_style + " " + (!main_color - #555) >>> p >>> :border= "1px " + !border_style + " #0000aa" >>> >>> This is a very powerful feature, but all those quotes and spaces >>> and so >>> forth is a little ugly. We don't like ugly, and one thing Haml has >>> taught us is that we don't need to suffer ugliness for the sake of >>> power. We can have both. So now we can... Sass will now >> automatically >>> concatenate adjacent values when doing constant arithmetic. For >>> example, >>> the above could be written as: >>> >>> !border_style= dotted >>> !main_color= #5588ee >>> >>> #main >>> :background-color= !main_color >>> :border= 2px !border_style (!main_color - #555) >>> p >>> :border= 1px !border_style #0000aa >>> >>> Much, much nicer. This will compile to: >>> >>> #main { >>> background-color: #5588ee; >>> border: 2px dotted #003399; } >>> p { >>> border: 1px dotted #0000aa; } >>> >>> >>> Enjoy! >>> >>>> >> >> >> >> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
