sassc-ruby
sassc-ruby copied to clipboard
how to migrate ruby-sass custom functions?
How do I migrate this ruby sass custom function to SassC? In a rails project, I just included this module in my application.rb and the likes of my-method
would be available in my sass files.
The ruby sass EOL blog posts suggests I should just sub "SassC" for "Sass" but that doesn't work. Digging in I don't see any of these methods defined in SassC either.
Thanks!
module Sass::Script::Functions
def my_method(string)
assert_type string, :String
prepend_host('prepend_thing', string)
end
declare :my_method, [:string]
end
Other blog post describing the implementation: http://www.seancolombo.com/2010/07/28/how-to-make-and-use-a-custom-sass-function/
I've had the same issue. I'm trying to figure out how to get a function to accept arbitrary keyword arguments, as before, and there doesn't seem to be a way built in.
@amcaplan Have you had any success on this?
Sorry @josh-m-sharpe, I haven't had time to pursue this further.
@bolandrm Sorry to ping - can you advise whether this was migrated or not? Happy to dig in and submit a patch, but I don't want to reinvent the wheel if it's already ported.
If it hasn't been ported, some advisement on implementation would be appreciated.
Thanks!