From 3fbee92b19664a538b779e3be54a01c12af4a480 Mon Sep 17 00:00:00 2001 From: connors Date: Fri, 20 Dec 2013 10:37:37 -0800 Subject: [PATCH] adding a simple gradient mixin --- dist/android-theme.css | 9 ++++++++- lib/sass/mixins.scss | 13 +++++++++++++ lib/sass/theme-android.scss | 10 +--------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/dist/android-theme.css b/dist/android-theme.css index 326b3af..e8f29a9 100644 --- a/dist/android-theme.css +++ b/dist/android-theme.css @@ -9,7 +9,14 @@ */ .content { - background-color: #111111; + background: #111111; + background: -moz-linear-gradient(top, #111111 0%, #222222 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #111111), color-stop(100%, #222222)); + background: -webkit-linear-gradient(top, #111111 0%, #222222 100%); + background: -o-linear-gradient(top, #111111 0%, #222222 100%); + background: -ms-linear-gradient(top, #111111 0%, #222222 100%); + background: linear-gradient(to bottom, #111111 0%, #222222 100%); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$color-form', endColorstr='$color-to',GradientType=0 ); } [class*="bar-"] { diff --git a/lib/sass/mixins.scss b/lib/sass/mixins.scss index 2b8967e..67b0f4a 100644 --- a/lib/sass/mixins.scss +++ b/lib/sass/mixins.scss @@ -24,6 +24,19 @@ box-shadow: $shadow; } +// Gradients +@mixin gradient($color-form, $color-to) { + background: $color-form; // Old browsers + background: -moz-linear-gradient(top, $color-form 0%, $color-to 100%); // FF3.6+ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$color-form), color-stop(100%,$color-to)); // Chrome,Safari4+ + background: -webkit-linear-gradient(top, $color-form 0%, $color-to 100%); // Chrome10+,Safari5.1+ + background: -o-linear-gradient(top, $color-form 0%, $color-to 100%); // Opera 11.10+ + background: -ms-linear-gradient(top, $color-form 0%, $color-to 100%); // IE10+ + background: linear-gradient(to bottom, $color-form 0%, $color-to 100%); // W3C + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$color-form', endColorstr='$color-to',GradientType=0 ); // IE6-9 + +} + // Transforms // -------------------------------------------------- diff --git a/lib/sass/theme-android.scss b/lib/sass/theme-android.scss index 47b67e7..9f23b63 100644 --- a/lib/sass/theme-android.scss +++ b/lib/sass/theme-android.scss @@ -40,15 +40,7 @@ $border-radius: 0; // -------------------------------------------------- .content { - background-color: $chrome-color; - background: rgb(0,0,0); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(0,0,0,1) 0%, rgba(68,68,68,1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,1)), color-stop(100%,rgba(68,68,68,1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(68,68,68,1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(68,68,68,1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(68,68,68,1) 100%); /* IE10+ */ - background: linear-gradient(to bottom, rgba(0,0,0,1) 0%,rgba(68,68,68,1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#444444',GradientType=0 ); /* IE6-9 */ + @include gradient($chrome-color,#222); } // Bars