aboutsummaryrefslogtreecommitdiff
path: root/themes/classic/sass/base/_utilities.scss
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-06-27 16:59:21 -0400
committerBrandon Mathis <brandon@imathis.com>2011-06-27 16:59:21 -0400
commit91f0190184b605a47183d9741ea0f08e208c2cb2 (patch)
treef2fe6c99d6992844a0bc0b777ffe554d6d04a913 /themes/classic/sass/base/_utilities.scss
parent353ccfd4ebec153a46b12faffff8ab2bba36efc8 (diff)
downloadmy_new_personal_website-91f0190184b605a47183d9741ea0f08e208c2cb2.tar.xz
my_new_personal_website-91f0190184b605a47183d9741ea0f08e208c2cb2.zip
Included Sass files which should have been in my previous commit. Oops!
How embarrassing. Also I've updated the gitignore.
Diffstat (limited to 'themes/classic/sass/base/_utilities.scss')
-rw-r--r--themes/classic/sass/base/_utilities.scss21
1 files changed, 21 insertions, 0 deletions
diff --git a/themes/classic/sass/base/_utilities.scss b/themes/classic/sass/base/_utilities.scss
new file mode 100644
index 00000000..8b718cdc
--- /dev/null
+++ b/themes/classic/sass/base/_utilities.scss
@@ -0,0 +1,21 @@
+@mixin mask-image($img, $repeat: no-repeat){
+ @include experimental(mask-image, image-url($img), -webkit, -moz, -o, -ms);
+ @include experimental(mask-repeat, $repeat, -webkit, -moz, -o, -ms);
+ width: image-width($img);
+ height: image-height($img);
+}
+
+@mixin selection($bg, $color: inherit, $text-shadow: none){
+ * {
+ &::-moz-selection { background: $bg; color: $color; text-shadow: $text-shadow; }
+ &::-webkit-selection { background: $bg; color: $color; text-shadow: $text-shadow; }
+ &::selection { background: $bg; color: $color; text-shadow: $text-shadow; }
+ }
+}
+
+@function text-color($color, $dark: dark, $light: light){
+ $text-color: ( (red($color)*299) + (green($color)*587) + (blue($color)*114) ) / 1000;
+ $text-color: if($text-color >= 150, $dark, $light);
+ @return $text-color;
+}
+