Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
ERB in your SASS: is it good or is it whack?

Interestings

Sass doesn't interpolate variable names

You can get around this by using another preprocessor before sassing (erb), provide tuples within the loop below, or make a lookup function (in sass).

/* This is totally illegal #sassycode */
@each $icon in (services, applications, documentation) {
.#{$icon}-icon {
&:before {
background-image: $#{icon}-sprite-position;
}
}
}

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *