Created
October 21, 2011 20:02
-
-
Save nheinrich/1304802 to your computer and use it in GitHub Desktop.
Attempt at a background texture mixin for a project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// _colors.sass | |
$bg_blue: #6ec2d8 | |
$bg_green: #6db933 | |
$bg_orange: #ff5924 | |
$bg_yellow: #e9f82e | |
// _mixins.sass | |
= textured($color) | |
background: eval("$bg_#{$color}") image_url("textures/#{$color}.png") | |
// note: this site uses four different background textures and they could all be built out with this mixin. Obviously this code is wrong but maybe it's close to get a pointer. | |
// currently produces: | |
// +textured("orange") => background: eval("$bg_orange") url('/images/textures/orange.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment