KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This relates specifically to the compass framework for SASS. I have created a sprite and also a gradient mixin. Is it possible to combine the two on the same item, and if so how? @import "compass/css3"; @import "icon/*.png"; @include all-icon-sprites; @mixin light-gradient { @include background-image(linear-gradient(top, $dark 20%, $light 100%)); color: $dark; text-shadow: $light; } button { @include light-gradient; @include icon-sprite(search); } Update: I've come up with this solution, can anybody improve on it? @import "compass/css3"; @import "compass/utilities/sprites"; $icon: sprite-map("icon/*.png"); $light-gradient: linear-gradient(bottom, $shade-2 20%, $shade-3 100%); $icon-search: sprite($icon, search) no-repeat; button { @include background($light-gradient, $icon-search); }
Tags (comma-separated)
Save Edits
Cancel