Commit 965102b3f654544adada3283dcd0fab92028f253
1 parent
52fbcd45
Exists in
master
and in
4 other branches
Move mixins and variables under gitlab bootstrap
Showing
7 changed files
with
84 additions
and
84 deletions
Show diff stats
app/assets/stylesheets/fonts.scss
| @@ -1,7 +0,0 @@ | @@ -1,7 +0,0 @@ | ||
| 1 | -@font-face{ | ||
| 2 | - font-family: Korolev; | ||
| 3 | - src: font-url('korolev-medium-compressed.otf'); | ||
| 4 | -} | ||
| 5 | - | ||
| 6 | -/** Typo **/ | ||
| 7 | -$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace; | ||
| 8 | \ No newline at end of file | 0 | \ No newline at end of file |
app/assets/stylesheets/gitlab_bootstrap.scss
| @@ -8,15 +8,15 @@ $baseLineHeight: 18px !default; | @@ -8,15 +8,15 @@ $baseLineHeight: 18px !default; | ||
| 8 | @import "bootstrap/responsive-1200px-min"; | 8 | @import "bootstrap/responsive-1200px-min"; |
| 9 | 9 | ||
| 10 | @import "font-awesome"; | 10 | @import "font-awesome"; |
| 11 | -@import "variables.scss"; | ||
| 12 | -@import "fonts.scss"; | ||
| 13 | -@import "mixins.scss"; | ||
| 14 | 11 | ||
| 15 | /** | 12 | /** |
| 16 | * GitLab bootstrap. | 13 | * GitLab bootstrap. |
| 17 | * Overrides some styles of twitter bootstrap. | 14 | * Overrides some styles of twitter bootstrap. |
| 18 | * Also give some common classes for GitLab app | 15 | * Also give some common classes for GitLab app |
| 19 | */ | 16 | */ |
| 17 | +@import "gitlab_bootstrap/variables.scss"; | ||
| 18 | +@import "gitlab_bootstrap/fonts.scss"; | ||
| 19 | +@import "gitlab_bootstrap/mixins.scss"; | ||
| 20 | @import "gitlab_bootstrap/common.scss"; | 20 | @import "gitlab_bootstrap/common.scss"; |
| 21 | @import "gitlab_bootstrap/typography.scss"; | 21 | @import "gitlab_bootstrap/typography.scss"; |
| 22 | @import "gitlab_bootstrap/buttons.scss"; | 22 | @import "gitlab_bootstrap/buttons.scss"; |
| @@ -0,0 +1,7 @@ | @@ -0,0 +1,7 @@ | ||
| 1 | +@font-face{ | ||
| 2 | + font-family: Korolev; | ||
| 3 | + src: font-url('korolev-medium-compressed.otf'); | ||
| 4 | +} | ||
| 5 | + | ||
| 6 | +/** Typo **/ | ||
| 7 | +$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace; | ||
| 0 | \ No newline at end of file | 8 | \ No newline at end of file |
| @@ -0,0 +1,69 @@ | @@ -0,0 +1,69 @@ | ||
| 1 | +/** | ||
| 2 | + * Generic mixins | ||
| 3 | + */ | ||
| 4 | + @mixin box-shadow($shadow) { | ||
| 5 | + -webkit-box-shadow: $shadow; | ||
| 6 | + -moz-box-shadow: $shadow; | ||
| 7 | + -ms-box-shadow: $shadow; | ||
| 8 | + -o-box-shadow: $shadow; | ||
| 9 | + box-shadow: $shadow; | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +@mixin border-radius($radius) { | ||
| 13 | + -webkit-border-radius: $radius; | ||
| 14 | + -moz-border-radius: $radius; | ||
| 15 | + -ms-border-radius: $radius; | ||
| 16 | + -o-border-radius: $radius; | ||
| 17 | + border-radius: $radius; | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +@mixin linear-gradient($from, $to) { | ||
| 21 | + background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to)); | ||
| 22 | + background-image: -webkit-linear-gradient($from, $to); | ||
| 23 | + background-image: -moz-linear-gradient($from, $to); | ||
| 24 | + background-image: -o-linear-gradient($from, $to); | ||
| 25 | +} | ||
| 26 | + | ||
| 27 | +/** | ||
| 28 | + * Prefilled mixins | ||
| 29 | + * Mixins with fixed values | ||
| 30 | + */ | ||
| 31 | +@mixin bg-light-gray-gradient { | ||
| 32 | + background: #f1f1f1; | ||
| 33 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1)); | ||
| 34 | + background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1); | ||
| 35 | + background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1); | ||
| 36 | + background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1); | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | +@mixin bg-gray-gradient { | ||
| 40 | + background: #eee; | ||
| 41 | + background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); | ||
| 42 | + background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 43 | + background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 44 | + background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 45 | +} | ||
| 46 | + | ||
| 47 | +@mixin bg-dark-gray-gradient { | ||
| 48 | + background: #eee; | ||
| 49 | + background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7); | ||
| 50 | + background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7); | ||
| 51 | + background-image: -o-linear-gradient(#e9e9e9, #d7d7d7); | ||
| 52 | +} | ||
| 53 | + | ||
| 54 | +@mixin shade { | ||
| 55 | + @include box-shadow(0 0 3px #ddd); | ||
| 56 | +} | ||
| 57 | + | ||
| 58 | +@mixin solid-shade { | ||
| 59 | + @include box-shadow(0 0 0 3px #f1f1f1); | ||
| 60 | +} | ||
| 61 | + | ||
| 62 | +@mixin header-font { | ||
| 63 | + color: $style_color; | ||
| 64 | + text-shadow: 0 1px 1px #FFF; | ||
| 65 | + font-family: 'Korolev', sans-serif; | ||
| 66 | + font-size: 28px; | ||
| 67 | + line-height: 48px; | ||
| 68 | + font-weight: normal; | ||
| 69 | +} |
app/assets/stylesheets/mixins.scss
| @@ -1,69 +0,0 @@ | @@ -1,69 +0,0 @@ | ||
| 1 | -/** | ||
| 2 | - * Generic mixins | ||
| 3 | - */ | ||
| 4 | - @mixin box-shadow($shadow) { | ||
| 5 | - -webkit-box-shadow: $shadow; | ||
| 6 | - -moz-box-shadow: $shadow; | ||
| 7 | - -ms-box-shadow: $shadow; | ||
| 8 | - -o-box-shadow: $shadow; | ||
| 9 | - box-shadow: $shadow; | ||
| 10 | -} | ||
| 11 | - | ||
| 12 | -@mixin border-radius($radius) { | ||
| 13 | - -webkit-border-radius: $radius; | ||
| 14 | - -moz-border-radius: $radius; | ||
| 15 | - -ms-border-radius: $radius; | ||
| 16 | - -o-border-radius: $radius; | ||
| 17 | - border-radius: $radius; | ||
| 18 | -} | ||
| 19 | - | ||
| 20 | -@mixin linear-gradient($from, $to) { | ||
| 21 | - background-image: -webkit-gradient(linear, 0 0, 0 100%, from($from), to($to)); | ||
| 22 | - background-image: -webkit-linear-gradient($from, $to); | ||
| 23 | - background-image: -moz-linear-gradient($from, $to); | ||
| 24 | - background-image: -o-linear-gradient($from, $to); | ||
| 25 | -} | ||
| 26 | - | ||
| 27 | -/** | ||
| 28 | - * Prefilled mixins | ||
| 29 | - * Mixins with fixed values | ||
| 30 | - */ | ||
| 31 | -@mixin bg-light-gray-gradient { | ||
| 32 | - background: #f1f1f1; | ||
| 33 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #f5f5f5), to(#e1e1e1)); | ||
| 34 | - background-image: -webkit-linear-gradient(#f5f5f5 6.6%, #e1e1e1); | ||
| 35 | - background-image: -moz-linear-gradient(#f5f5f5 6.6%, #e1e1e1); | ||
| 36 | - background-image: -o-linear-gradient(#f5f5f5 6.6%, #e1e1e1); | ||
| 37 | -} | ||
| 38 | - | ||
| 39 | -@mixin bg-gray-gradient { | ||
| 40 | - background: #eee; | ||
| 41 | - background-image: -webkit-gradient(linear, 0 0, 0 30, color-stop(0.066, #eee), to(#dfdfdf)); | ||
| 42 | - background-image: -webkit-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 43 | - background-image: -moz-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 44 | - background-image: -o-linear-gradient(#eee 6.6%, #dfdfdf); | ||
| 45 | -} | ||
| 46 | - | ||
| 47 | -@mixin bg-dark-gray-gradient { | ||
| 48 | - background: #eee; | ||
| 49 | - background-image: -webkit-linear-gradient(#e9e9e9, #d7d7d7); | ||
| 50 | - background-image: -moz-linear-gradient(#e9e9e9, #d7d7d7); | ||
| 51 | - background-image: -o-linear-gradient(#e9e9e9, #d7d7d7); | ||
| 52 | -} | ||
| 53 | - | ||
| 54 | -@mixin shade { | ||
| 55 | - @include box-shadow(0 0 3px #ddd); | ||
| 56 | -} | ||
| 57 | - | ||
| 58 | -@mixin solid-shade { | ||
| 59 | - @include box-shadow(0 0 0 3px #f1f1f1); | ||
| 60 | -} | ||
| 61 | - | ||
| 62 | -@mixin header-font { | ||
| 63 | - color: $style_color; | ||
| 64 | - text-shadow: 0 1px 1px #FFF; | ||
| 65 | - font-family: 'Korolev', sans-serif; | ||
| 66 | - font-size: 28px; | ||
| 67 | - line-height: 48px; | ||
| 68 | - font-weight: normal; | ||
| 69 | -} |