Code Monkey home page Code Monkey logo

sassy-strings's People

Contributors

snugug avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sassy-strings's Issues

[off-topic] sass interpolation in css comments

Sorry guys for posting this question here. Maybe some sass pro had a solution for this.

Is it possible to pares css comments with sass and interpolate variables?

$background-color: #FFF;

// comment dummy #{$background-color} interpolation
- or - 
/* comment dummy #{$background-color} interpolation */

result:
// comment dummy #FFF interpolation

Custom trim

Is having the ability to trim left / right or both worth adding it?

str-replace as a while loop

Don't remember why I wrote it this way instead of as a recursive function, but something to look at.

@function str-replace($string, $search, $replace) {
  $length: str-length($replace);
  $index: str-index($string, $search);
  $slice: $string;
  @while $index != 0 {
    $slice: str-slice($slice, 0, $index - 1);
    $slice: $slice + $replace;
    $slice: $slice + str-slice($string, $index + $length);
    $index: str-index($slice, $search);
  }
  @return $slice;
}

versions off?

Your gemfile: gem 'sassy-strings', '0.4.0'

but you're at 1.0.0 right?

str-split

Could str-split be reworked to accept a param to split it at a certain character? (like javascript?)

str-split('foo.bar', '.')
=> (foo, bar)

str-replace : `str-index` improperly used.

Hello!

The str-index() function is improperly used : it should be testing for "null", as per Sass Reference, since we are querying for the position of the first occurrence and not a count of the number of occurrences.

@if str-index($new, $old) != null {
    // ...
}

and

@if $index != null and $new != $old {
    // ...
}

Cheers,

Gem install error

Has this gem been pushed to rubygems.org?

Tried installing it:

$ gem install SassyStrings
ERROR:  Could not find a valid gem 'SassyStrings' (>= 0) in any repository
ERROR:  Possible alternatives: sassy-strings

And sassy-strings is @Snugug's old version from August 2013, not the @team-sass version.

Infinite recursion avoided. Why?

$shortName: str-replace($font, ' ', '');

Error:
WARNING: The string to be replaced is contained in the new string. Infinite recursion avoided.

' ' to '' ?

Also

$shortName: str-replace($font, 'a', 'b');

Same!

Problem with Sass 3.4

On Sass 3.4 I'm getting the following error, any idea if this is caused by this gem ?

Errno::ENOENT on line ["670"] of /Users/anahkiasen/.rvm/gems/ruby-2.1.2@madewithlove/gems/sass-3.4.2/lib/sass/util.rb: No such file or directory @ realpath_rec - /Users/anahkiasen/.rvm/gems/ruby-2.1.2@madewithlove/gems/sassy-strings-1.0.0/stylesheets
Run with --trace to see the full backtrace

match()

Being able to provide a match function to check wether a string matches a certain regular expression would be quite cool.

Although coding this in pure Sass would be crazy. What about a Ruby function for this one?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.