Permalink
Browse files

form

  • Loading branch information...
banacorn committed Feb 16, 2013
1 parent 9eb9f37 commit 89b5e41492f3d6836671f5a3d3c22d2ca4b57e8c
Showing with 91 additions and 6 deletions.
  1. +18 −0 less/buttons.less
  2. +41 −0 less/forms.less
  3. +12 −0 less/mixins.less
  4. +20 −6 less/variables.less
View
@@ -235,5 +235,23 @@ input[type="submit"].btn {
// Core
.btn {
+ .buttonBackground(@btnBackground, @btnBackgroundHighlight, @white, 0 1px 1px rgba(255,255,255,.75));
border: none;
}
+
+// Set the backgrounds
+// -------------------------
+.btn-primary {
+ .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
+}
+
+
+// Button Sizes
+// --------------------------------------------------
+
+// Extra-Large
+.btn-extra-large {
+ padding: @paddingExtraLarge;
+ font-size: @fontSizeExtraLarge;
+ .border-radius(@borderRadiusLarge);
+}
View
@@ -688,3 +688,44 @@ legend + .control-group {
padding-left: @horizontalComponentOffset;
}
}
+
+
+/////////////////////////////////////
+// OVERRIDE
+/////////////////////////////////////
+
+
+// Form controls
+// -------------------------
+
+// Everything else
+textarea,
+input[type="text"],
+input[type="password"],
+input[type="datetime"],
+input[type="datetime-local"],
+input[type="date"],
+input[type="month"],
+input[type="time"],
+input[type="week"],
+input[type="number"],
+input[type="email"],
+input[type="url"],
+input[type="search"],
+input[type="tel"],
+input[type="color"],
+.uneditable-input {
+ background-color: @inputBackground;
+ border: none;
+ .box-shadow(~"0 1px 0 white, inset 0 1px 3px rgba(0, 0, 0, 0.5)");
+ // .transition(~"border linear .2s, box-shadow linear .2s");
+
+ // Focus state
+ &:focus {
+ border-color: rgba(82,168,236,.8);
+ outline: 0;
+ outline: thin dotted \9; /* IE6-9 */
+ // .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
+ }
+}
+
View
@@ -729,3 +729,15 @@
background-color: darken(@endColor, 10%) e("\9");
}
}
+
+
+/////////////////////////////////////
+// OVERRIDE
+/////////////////////////////////////
+
+// Drop shadows
+.box-shadow() {
+ -webkit-box-shadow: @arguments;
+ -moz-box-shadow: @arguments;
+ box-shadow: @arguments;
+}
View
@@ -306,7 +306,8 @@
// Accent colors
// -------------------------
-@blue: #345;
+@blue: #345;
+@gold: darken(gold, 5%);
// Navbar
// -------------------------
@@ -315,9 +316,22 @@
// Buttons
// -------------------------
-@btnBackground: @white;
-@btnBackgroundHighlight: darken(@white, 10%);
-@btnBorder: #ccc;
+@btnBackground: @blue;
+@btnBackgroundHighlight: lighten(@btnBackground, 10%);
+
+@btnPrimaryBackground: @gold;
+@btnPrimaryBackgroundHighlight: lighten(@btnPrimaryBackground, 10%);
+
+
+// Component sizing
+// -------------------------
+// Based on 14px font-size and 20px line-height
+
+@fontSizeExtraLarge: @baseFontSize * 1.6; // ~18px
+
+@paddingExtraLarge: 16px 28px; // 44px
-@btnPrimaryBackground: @blue;
-@btnPrimaryBackgroundHighlight: darken(@btnPrimaryBackground, 10%);
+
+// Forms
+// -------------------------
+// @inputBackground: @grayLighter;

0 comments on commit 89b5e41

Please sign in to comment.