diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 2f732b2..d91eec4 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -9,8 +9,9 @@ *= require_self */ -/** Override bootstrap variables **/ -$font-size-base: 13px !default; +@import "main/variables.scss"; +@import "main/mixins.scss"; +@import "main/fonts.scss"; /** * Twitter bootstrap: @@ -28,6 +29,10 @@ $font-size-base: 13px !default; */ @import "generic.scss"; + +/** + * Unrefactored css + */ @import "common.scss"; diff --git a/app/assets/stylesheets/generic.scss b/app/assets/stylesheets/generic.scss index 4f77161..4c59358 100644 --- a/app/assets/stylesheets/generic.scss +++ b/app/assets/stylesheets/generic.scss @@ -1,6 +1,3 @@ -@import "generic/variables.scss"; -@import "generic/fonts.scss"; -@import "generic/mixins.scss"; @import "generic/avatar.scss"; @import "generic/nav.scss"; @import "generic/common.scss"; diff --git a/app/assets/stylesheets/generic/fonts.scss b/app/assets/stylesheets/generic/fonts.scss deleted file mode 100644 index 8cc9986..0000000 --- a/app/assets/stylesheets/generic/fonts.scss +++ /dev/null @@ -1,2 +0,0 @@ -/** Typo **/ -$monospace_font: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace; diff --git a/app/assets/stylesheets/generic/mixins.scss b/app/assets/stylesheets/generic/mixins.scss deleted file mode 100644 index e637b64..0000000 --- a/app/assets/stylesheets/generic/mixins.scss +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Generic mixins - */ - @mixin box-shadow($shadow) { - -webkit-box-shadow: $shadow; - -moz-box-shadow: $shadow; - -ms-box-shadow: $shadow; - -o-box-shadow: $shadow; - box-shadow: $shadow; -} - -@mixin border-radius($radius) { - -webkit-border-radius: $radius; - -moz-border-radius: $radius; - -ms-border-radius: $radius; - -o-border-radius: $radius; - border-radius: $radius; -} - -@mixin border-radius-left($radius) { - @include border-radius($radius 0 0 $radius) -} - -@mixin linear-gradient($from, $to) { - background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to)); - background-image: -webkit-linear-gradient($from, $to); - background-image: -moz-linear-gradient($from, $to); - background-image: -ms-linear-gradient($from, $to); - background-image: -o-linear-gradient($from, $to); -} - -@mixin transition($transition) { - -webkit-transition: $transition; - -moz-transition: $transition; - -ms-transition: $transition; - -o-transition: $transition; - transition: $transition; -} - -/** - * Prefilled mixins - * Mixins with fixed values - */ -@mixin bg-light-gray-gradient { - background: #f1f1f1; - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1)); - background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1); - background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1); - background-image: -ms-linear-gradient(#f5f5f5 6.6%, #e1e1e1); - background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1); -} - -@mixin bg-gray-gradient { - background: #eee; - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); - background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); - background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); - background-image: -ms-linear-gradient(#eee 6.6%, #dfdfdf); - background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); -} - -@mixin bg-dark-gray-gradient { - background: #eee; - background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7); - background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7); - background-image: -ms-linear-gradient(#e9e9e9, #d7d7d7); - background-image: -o-linear-gradient(#e9e9e9, #d7d7d7); -} - -@mixin shade { - @include box-shadow(0 0 3px #ddd); -} - -@mixin solid-shade { - @include box-shadow(0 0 0 3px #f1f1f1); -} - -@mixin header-font { - color: $style_color; - text-shadow: 0 1px 1px #FFF; - font-size: 16px; - line-height: 44px; - font-weight: normal; -} - -@mixin md-typography { - img { - max-width: 100%; - } - - *:first-child { - margin-top: 0; - } - - code { padding: 0 4px; } - - h1 { - margin-top: 45px; - font-size: 2.5em; - } - - h2 { - margin-top: 40px; - font-size: 2em; - } - - h3 { - margin-top: 35px; - font-size: 2em; - } - - h4 { - margin-top: 30px; - font-size: 1.5em; - } - - blockquote p { - color: #888; - font-size: 14px; - line-height: 1.5; - } - - table { - @extend .table; - @extend .table-bordered; - th { - background: #EEE; - } - } - - code { - font-size: inherit; - font-weight: inherit; - color: #555; - } - - li { - line-height: 1.5; - } -} - -@mixin page-title { - color: #333; - font-size: 20px; - line-height: 1.5; - margin-top: 0px; - margin-bottom: 15px; -} diff --git a/app/assets/stylesheets/generic/variables.scss b/app/assets/stylesheets/generic/variables.scss deleted file mode 100644 index aeabe7a..0000000 --- a/app/assets/stylesheets/generic/variables.scss +++ /dev/null @@ -1,13 +0,0 @@ -/** - * General Colors - */ -$primary_color: #2FA0BB; -$link_color: #3A89A3; -$style_color: #474D57; -$hover: #D9EDF7; - -/** - * Commit Diff Colors - */ -$added: #63c363; -$deleted: #f77; diff --git a/app/assets/stylesheets/main/fonts.scss b/app/assets/stylesheets/main/fonts.scss new file mode 100644 index 0000000..8cc9986 --- /dev/null +++ b/app/assets/stylesheets/main/fonts.scss @@ -0,0 +1,2 @@ +/** Typo **/ +$monospace_font: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace; diff --git a/app/assets/stylesheets/main/mixins.scss b/app/assets/stylesheets/main/mixins.scss new file mode 100644 index 0000000..e637b64 --- /dev/null +++ b/app/assets/stylesheets/main/mixins.scss @@ -0,0 +1,148 @@ +/** + * Generic mixins + */ + @mixin box-shadow($shadow) { + -webkit-box-shadow: $shadow; + -moz-box-shadow: $shadow; + -ms-box-shadow: $shadow; + -o-box-shadow: $shadow; + box-shadow: $shadow; +} + +@mixin border-radius($radius) { + -webkit-border-radius: $radius; + -moz-border-radius: $radius; + -ms-border-radius: $radius; + -o-border-radius: $radius; + border-radius: $radius; +} + +@mixin border-radius-left($radius) { + @include border-radius($radius 0 0 $radius) +} + +@mixin linear-gradient($from, $to) { + background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to)); + background-image: -webkit-linear-gradient($from, $to); + background-image: -moz-linear-gradient($from, $to); + background-image: -ms-linear-gradient($from, $to); + background-image: -o-linear-gradient($from, $to); +} + +@mixin transition($transition) { + -webkit-transition: $transition; + -moz-transition: $transition; + -ms-transition: $transition; + -o-transition: $transition; + transition: $transition; +} + +/** + * Prefilled mixins + * Mixins with fixed values + */ +@mixin bg-light-gray-gradient { + background: #f1f1f1; + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1)); + background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1); + background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1); + background-image: -ms-linear-gradient(#f5f5f5 6.6%, #e1e1e1); + background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1); +} + +@mixin bg-gray-gradient { + background: #eee; + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); + background-image: -ms-linear-gradient(#eee 6.6%, #dfdfdf); + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); +} + +@mixin bg-dark-gray-gradient { + background: #eee; + background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7); + background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7); + background-image: -ms-linear-gradient(#e9e9e9, #d7d7d7); + background-image: -o-linear-gradient(#e9e9e9, #d7d7d7); +} + +@mixin shade { + @include box-shadow(0 0 3px #ddd); +} + +@mixin solid-shade { + @include box-shadow(0 0 0 3px #f1f1f1); +} + +@mixin header-font { + color: $style_color; + text-shadow: 0 1px 1px #FFF; + font-size: 16px; + line-height: 44px; + font-weight: normal; +} + +@mixin md-typography { + img { + max-width: 100%; + } + + *:first-child { + margin-top: 0; + } + + code { padding: 0 4px; } + + h1 { + margin-top: 45px; + font-size: 2.5em; + } + + h2 { + margin-top: 40px; + font-size: 2em; + } + + h3 { + margin-top: 35px; + font-size: 2em; + } + + h4 { + margin-top: 30px; + font-size: 1.5em; + } + + blockquote p { + color: #888; + font-size: 14px; + line-height: 1.5; + } + + table { + @extend .table; + @extend .table-bordered; + th { + background: #EEE; + } + } + + code { + font-size: inherit; + font-weight: inherit; + color: #555; + } + + li { + line-height: 1.5; + } +} + +@mixin page-title { + color: #333; + font-size: 20px; + line-height: 1.5; + margin-top: 0px; + margin-bottom: 15px; +} diff --git a/app/assets/stylesheets/main/variables.scss b/app/assets/stylesheets/main/variables.scss new file mode 100644 index 0000000..86b207f --- /dev/null +++ b/app/assets/stylesheets/main/variables.scss @@ -0,0 +1,16 @@ +/** Override bootstrap variables **/ +$font-size-base: 13px !default; + +/** + * General Colors + */ +$primary_color: #2FA0BB; +$link_color: #3A89A3; +$style_color: #474D57; +$hover: #D9EDF7; + +/** + * Commit Diff Colors + */ +$added: #63c363; +$deleted: #f77; -- libgit2 0.21.2