3 Automatic Sass Snippets(hmphry.com)

almost 6 years ago from Hmphry x, www.hmphry.com

  • Hawke BassignaniHawke Bassignani, almost 6 years ago

    I enjoyed reading this, especially because of your helpful annotations.

    Question on the color function: have you noticed any significant increase in compile time for this snippet? (Or really any of them)?

    It would probably depend on how large your map was (and how many times you were calling the color() function). Just curious. :-)

    1 point
    • Hmphry xHmphry x, almost 6 years ago

      Full disclosure, I use Gulp so everything is fast off the bat. Experiences will probably vary depending on the tool. That said, I had a predecessor to the font's mixin which I feel extended the compile time. I never tested it, though. Instead, I switched from ruby-sass to gulp-sass(which is libsass, if I recall correctly) and never looked back. That all said, I guess it depends on how often you will call it. I'm not sure how sass works, but if it's anything like JS, a variable should be faster inherently faster, but you may not notice the render speed until you called in 5000 times.

      I will look into running some speed tests and get back to you in a few days.

      0 points