summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramurrel <amurrel@purdue.edu>2014-09-05 23:54:31 -0400
committeramurrel <amurrel@purdue.edu>2014-09-05 23:54:31 -0400
commit9127b3aca0ea384877e05d54fd01bb1d9d3b812f (patch)
tree2a0fe636dc319012bc2a7597050a0f443ed00178
parent64aba5197266465d971d77c0212ed5993cb80757 (diff)
Converted from scss to less
-rw-r--r--app/assets/stylesheets/application.css.less (renamed from app/assets/stylesheets/application.css.scss)0
-rw-r--r--app/assets/stylesheets/bootstrapify.less (renamed from app/assets/stylesheets/bootstrapify.scss)51
-rw-r--r--app/assets/stylesheets/colors.less32
-rw-r--r--app/assets/stylesheets/colors.scss32
-rw-r--r--app/assets/stylesheets/scaffolds.less (renamed from app/assets/stylesheets/scaffolds.scss)30
5 files changed, 74 insertions, 71 deletions
diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.less
index c6020bd..c6020bd 100644
--- a/app/assets/stylesheets/application.css.scss
+++ b/app/assets/stylesheets/application.css.less
diff --git a/app/assets/stylesheets/bootstrapify.scss b/app/assets/stylesheets/bootstrapify.less
index 316847a..eb3b86b 100644
--- a/app/assets/stylesheets/bootstrapify.scss
+++ b/app/assets/stylesheets/bootstrapify.less
@@ -26,7 +26,7 @@
// Connect Bootstrap classes to reasonable defaults
.btn {
- @extend .btn-default;
+ &:extend(.btn-default);
}
button,
@@ -34,18 +34,18 @@ button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
- @extend .btn;
+ &:extend(.btn);
}
.navbar {
form {
- @extend .navbar-form;
+ &:extend(.navbar-form);
}
.nav {
- @extend .navbar-nav;
+ &:extend(.navbar-nav);
}
ul {
- @extend .nav;
+ &:extend(.nav);
}
}
form {
@@ -64,33 +64,34 @@ form {
input[type="range"],
input[type="color"],
select, textarea {
- @extend .form-control;
+ &:extend(.form-control);
}
label {
- @extend .control-label;
+ &:extend(.control-label);
}
}
header nav {
- @extend .navbar;
- @extend .navbar-default;
+ &:extend(.navbar);
+ &:extend(.navbar-default);
}
-.alert { @extend .alert-default; }
-.alert-success { @extend .alert; }
-.alert-info { @extend .alert; }
-.alert-warning { @extend .alert; }
-.alert-danger { @extend .alert; }
+.alert:extend(.alert-default) {}
+.alert-success,
+.alert-info,
+.alert-warning,
+.alert-danger { &:extend(.alert); }
+
+.panel-primary,
+.panel-success,
+.panel-info,
+.panel-warning,
+.panel-danger { &:extend(.panel); }
-.panel-primary { @extend .panel; }
-.panel-success { @extend .panel; }
-.panel-info { @extend .panel; }
-.panel-warning { @extend .panel; }
-.panel-danger { @extend .panel; }
.panel {
h1, h2, h3, h4, h5, h6 {
- @extend .panel-heading;
- @extend .panel-title;
+ &:extend(.panel-heading);
+ &:extend(.panel-title);
}
}
@@ -98,19 +99,19 @@ header nav {
form {
.field {
- @extend .form-group;
+ &:extend(.form-group);
.field_with_errors {
display: inline !important;
}
}
.field_with_errors {
- @extend .has-error;
+ &:extend(.has-error);
}
}
#error_explanation {
- @extend .panel-danger;
- @extend .container;
+ &:extend(.panel-danger);
+ &:extend(.container);
padding-left: 0;
padding-right: 0;
}
diff --git a/app/assets/stylesheets/colors.less b/app/assets/stylesheets/colors.less
new file mode 100644
index 0000000..61e1e57
--- /dev/null
+++ b/app/assets/stylesheets/colors.less
@@ -0,0 +1,32 @@
+/*
+@darker-orange: #9D4102;
+@link-yellow: #FFC50D;
+@orange: #DD9125;
+@page-color: #444;
+@toolbar-color: black;
+*/
+
+// See this file for a complete list of variables:
+// vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.1.1.1/vendor/assets/stylesheets/bootstrap/_variables.less
+// Or visit:
+// http://getbootstrap.com/customize/#less-variables
+/*
+@gray-darker:
+@gray-dark:
+@gray:
+@gray-light:
+@gray-lighter:
+
+@brand-primary:
+@brand-success:
+@brand-info:
+@brand-warning:
+@brand-danger:
+*/
+
+/*
+@text-color: #DD9125;
+@body-bg: #333;
+*/
+
+@legend-border-color: #ccc; // matches the default @input-border and @btn-default-border
diff --git a/app/assets/stylesheets/colors.scss b/app/assets/stylesheets/colors.scss
deleted file mode 100644
index 4a5ca71..0000000
--- a/app/assets/stylesheets/colors.scss
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-$darker-orange: #9D4102;
-$link-yellow: #FFC50D;
-$orange: #DD9125;
-$page-color: #444;
-$toolbar-color: black;
-*/
-
-// See this file for a complete list of variables:
-// vendor/bundle/ruby/2.0.0/gems/bootstrap-sass-3.1.1.1/vendor/assets/stylesheets/bootstrap/_variables.scss
-// Or visit (replace '@' with '$'; less uses '@' for variables)
-// http://getbootstrap.com/customize/#less-variables
-/*
-$gray-darker:
-$gray-dark:
-$gray:
-$gray-light:
-$gray-lighter:
-
-$brand-primary:
-$brand-success:
-$brand-info:
-$brand-warning:
-$brand-danger:
-*/
-
-/*
-$text-color: #DD9125;
-$body-bg: #333;
-*/
-
-$legend-border-color: #ccc; // matches the default $input-border and $btn-default-border
diff --git a/app/assets/stylesheets/scaffolds.scss b/app/assets/stylesheets/scaffolds.less
index a223672..bbdd989 100644
--- a/app/assets/stylesheets/scaffolds.scss
+++ b/app/assets/stylesheets/scaffolds.less
@@ -37,6 +37,8 @@
}
.btn, .form-control {
display: table-cell !important;
+ /* .simple-input-group .btn:not(:last-child),
+ * .simple-input-group .form-control:not(:last-child) { ... } */
&:not(:last-child) {
@include border-right-radius(0);
}
@@ -51,8 +53,8 @@
/* Specific page elements */
#notice {
- @extend .alert-success;
- @extend .container;
+ &:extend(.alert-success);
+ &:extend(.container);
text-align: center;
}
@@ -62,16 +64,16 @@
form#search {
- @extend .navbar-left;
+ &:extend(.navbar-left);
div {
- @extend .simple-input-group;
+ &:extend(.simple-input-group);
}
}
#user-actions {
- @extend .navbar-btn;
- @extend .navbar-right;
- @extend .simple-input-group;
+ &:extend(.navbar-btn);
+ &:extend(.navbar-right);
+ &:extend(.simple-input-group);
span {
padding-right: .25em;
}
@@ -129,7 +131,7 @@ form#search {
/**** INDEX PAGE - TABLE AND GRAPH ****/
#matches-table {
- @extend .table;
+ &:extend(.table);
color: #FFF;
form {
@@ -141,11 +143,11 @@ form#search {
/*
.btn {
- &.user { @extend .btn-info; }
- &.signup { @extend .btn-success; }
- &.signin { @extend .btn-warning; }
- &.signout { @extend .btn-danger; }
- &.server { @extend .btn-warning; }
+ &.user:extend(.btn-info) {}
+ &.signup:extend(.btn-success) {}
+ &.signin:extend(.btn-warning) {}
+ &.signout:extend(.btn-danger) {}
+ &.server:extend(.btn-warning) {}
&.create-alert {
color: white;
background-color: rgb(255, 69, 0);
@@ -171,7 +173,7 @@ div.field span.help-block {
/* Elements *********************************************************/
footer {
- @extend .container;
+ &:extend(.container);
margin-top: 1em;
border-top: solid 1px $hr-border;
text-align: center;