Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Forked from metaskills/gist:2416795
Created April 18, 2012 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriseppstein/2416833 to your computer and use it in GitHub Desktop.
Save chriseppstein/2416833 to your computer and use it in GitHub Desktop.
Custom Sass Function For stringinclude(a, b)
module Sass::Script::Functions
def includes_string(string, substring)
assert_type string, :String
assert_type substring, :String
Sass::Script::Bool.new(string.value.include?(substring.value))
end
declare :includes_string, [:string, :substring]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment