diff --git a/_svg.scss b/_svg.scss index 538d0f9..341ed1d 100644 --- a/_svg.scss +++ b/_svg.scss @@ -11,21 +11,21 @@ $length: str-length($search); $index: str-index($string, $search); $slice: $string; - + @while $index != null { $start: if($index > 1, str-slice($slice, 1, $index - 1), ''); $slice: $start + $replace + str-slice($slice, $index + $length); - + $index: str-index($slice, $search); } - + @return $slice; } // Create an inline SVG data URI @function svg($content, $viewBox: "0 0 100 100") { $content: str-replace($content, '#', '%23'); // Firefox needs this - + @return url('data:image/svg+xml,#{$content}'); } diff --git a/index.html b/index.html index 615a661..12a5e07 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + Form element autosizing, the way it should be. @@ -46,7 +46,7 @@ Examples Textarea: - + Input with placeholder: @@ -100,7 +100,7 @@ JavaScript API Stretchy.applyAll(elements) Apply Stretchy.apply() to a collection of elements, or all Stretchy is set to apply to, if no argument is provided. - + Stretchy.applies() Can Stretchy be used on this particular element? (checks if element is in the DOM, if it's of the right type and if it matches the selector filter provided by data-stretchy-selector, if the attribute is set. @@ -119,9 +119,9 @@ Browser Support Notes - - + +
Form element autosizing, the way it should be.
Stretchy.apply()
data-stretchy-selector