summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Punt <koen@koenpunt.nl>2012-11-23 17:26:26 +0100
committerKoen Punt <koen@koenpunt.nl>2012-11-29 12:18:44 +0100
commit755e4a470015ad83337943d62a32ede2921eda53 (patch)
treef9d4a266c12b74e5b62d3c43f5a4d95b58c0d59b
parenteb1004f7890d25a86beb0ca0a7eca802d9fce665 (diff)
downloadgitlab-ce-755e4a470015ad83337943d62a32ede2921eda53.tar.gz
Removed css declarations out of main.scss, so main is only a collector
Fonts, variables and mixins are now all in their own stylesheets
-rw-r--r--app/assets/stylesheets/fonts.scss7
-rw-r--r--app/assets/stylesheets/main.scss113
-rw-r--r--app/assets/stylesheets/mixins.scss74
-rw-r--r--app/assets/stylesheets/variables.scss6
4 files changed, 106 insertions, 94 deletions
diff --git a/app/assets/stylesheets/fonts.scss b/app/assets/stylesheets/fonts.scss
new file mode 100644
index 00000000000..88c966d18f7
--- /dev/null
+++ b/app/assets/stylesheets/fonts.scss
@@ -0,0 +1,7 @@
+@font-face{
+ font-family: Korolev;
+ src: font-url('korolev-medium-compressed.otf');
+}
+
+/** Typo **/
+$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace; \ No newline at end of file
diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss
index 924566e9dde..e707de02201 100644
--- a/app/assets/stylesheets/main.scss
+++ b/app/assets/stylesheets/main.scss
@@ -5,101 +5,26 @@ $baseLineHeight: 18px !default;
// BOOTSTRAP
// ------------------
@import "bootstrap";
+@import "bootstrap-responsive";
+@import "font-awesome";
-// BOOTSTRAP RESPONSIVE
-// ------------------
-@import "bootstrap/responsive-utilities";
-@import "bootstrap/responsive-1200px-min";
-
-// FONT AWESOME
-@import 'font-awesome';
-
-/** GitLab colors **/
-$link_color: #3A89A3;
-$blue_link: #2FA0BB;
-$style_color: #474D57;
-$hover: #D9EDF7;
-$hover_border: #ADF;
-
-/** GitLab Fonts **/
-@font-face { font-family: Korolev; src: font-url('korolev-medium-compressed.otf'); }
-$monospace: 'Menlo', 'Liberation Mono', 'Consolas', 'Courier New', 'andale mono', 'lucida console', monospace;
-
-/** MIXINS **/
-@mixin shade {
- -moz-box-shadow: 0 0 3px #ddd;
- -webkit-box-shadow: 0 0 3px #ddd;
- box-shadow: 0 0 3px #ddd;
-}
-
-@mixin solid_shade {
- -moz-box-shadow: 0 0 0 3px #f1f1f1;
- -webkit-box-shadow: 0 0 0 3px #f1f1f1;
- box-shadow: 0 0 0 3px #f1f1f1;
-}
-
-@mixin border-radius($radius) {
- -moz-border-radius: $radius;
- -webkit-border-radius: $radius;
- border-radius: $radius;
-}
-
-@mixin round-borders-bottom($radius) {
- border-top: 1px solid #eaeaea;
- -moz-border-radius-bottomright: $radius;
- -moz-border-radius-bottomleft: $radius;
- border-bottom-right-radius: $radius;
- border-bottom-left-radius: $radius;
- -webkit-border-bottom-left-radius: $radius;
- -webkit-border-bottom-right-radius: $radius;
-}
-
-@mixin round-borders-top($radius) {
- border-top: 1px solid #eaeaea;
- -moz-border-radius-topright: $radius;
- -moz-border-radius-topleft: $radius;
- border-top-right-radius: $radius;
- border-top-left-radius: $radius;
- -webkit-border-top-left-radius: $radius;
- -webkit-border-top-right-radius: $radius;
-}
-
-@mixin round-borders-all($radius) {
- border: 1px solid #eaeaea;
- -moz-border-radius: $radius;
- -webkit-border-radius: $radius;
- border-radius: $radius;
-}
-
-@mixin bg-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: -o-linear-gradient($from, $to);
-}
-
-@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: -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: -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: -o-linear-gradient(#e9e9e9, #d7d7d7);
-}
+/**
+ * Variables
+ * Contains colors
+ */
+@import "variables.scss";
+
+/**
+ * Custom fonts
+ * Contains @font-face font Korolev and default $monotype
+ */
+@import "fonts.scss";
+
+/**
+ * General mixins.
+ * Contains rounded borders, gradients and shades
+ */
+@import "mixins.scss";
/**
* Header of application.
diff --git a/app/assets/stylesheets/mixins.scss b/app/assets/stylesheets/mixins.scss
new file mode 100644
index 00000000000..e66f6095c2c
--- /dev/null
+++ b/app/assets/stylesheets/mixins.scss
@@ -0,0 +1,74 @@
+@mixin shade {
+ -moz-box-shadow: 0 0 3px #ddd;
+ -webkit-box-shadow: 0 0 3px #ddd;
+ box-shadow: 0 0 3px #ddd;
+}
+
+@mixin solid_shade {
+ -moz-box-shadow: 0 0 0 3px #f1f1f1;
+ -webkit-box-shadow: 0 0 0 3px #f1f1f1;
+ box-shadow: 0 0 0 3px #f1f1f1;
+}
+
+@mixin border-radius($radius) {
+ -moz-border-radius: $radius;
+ -webkit-border-radius: $radius;
+ border-radius: $radius;
+}
+
+@mixin round-borders-bottom($radius) {
+ border-top: 1px solid #eaeaea;
+ -webkit-border-bottom-left-radius: $radius;
+ -webkit-border-bottom-right-radius: $radius;
+ -moz-border-radius-bottomright: $radius;
+ -moz-border-radius-bottomleft: $radius;
+ border-bottom-right-radius: $radius;
+ border-bottom-left-radius: $radius;
+}
+
+@mixin round-borders-top($radius) {
+ border-top: 1px solid #eaeaea;
+ -moz-border-radius-topright: $radius;
+ -moz-border-radius-topleft: $radius;
+ border-top-right-radius: $radius;
+ border-top-left-radius: $radius;
+ -webkit-border-top-left-radius: $radius;
+ -webkit-border-top-right-radius: $radius;
+}
+
+@mixin round-borders-all($radius) {
+ border: 1px solid #eaeaea;
+ -moz-border-radius: $radius;
+ -webkit-border-radius: $radius;
+ border-radius: $radius;
+}
+
+@mixin bg-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: -o-linear-gradient($from, $to);
+}
+
+@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: -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: -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: -o-linear-gradient(#e9e9e9, #d7d7d7);
+}
diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss
new file mode 100644
index 00000000000..8e5394c84a0
--- /dev/null
+++ b/app/assets/stylesheets/variables.scss
@@ -0,0 +1,6 @@
+/** Colors **/
+$link_color: #3A89A3;
+$blue_link: #2FA0BB;
+$style_color: #474D57;
+$hover: #D9EDF7;
+$hover_border: #ADF;