Skip to content

Commit

Permalink
form
Browse files Browse the repository at this point in the history
  • Loading branch information
banacorn committed Feb 16, 2013
1 parent 9eb9f37 commit 89b5e41
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 6 deletions.
18 changes: 18 additions & 0 deletions less/buttons.less
Expand Up @@ -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);
}
41 changes: 41 additions & 0 deletions less/forms.less
Expand Up @@ -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)");
}
}

12 changes: 12 additions & 0 deletions less/mixins.less
Expand Up @@ -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;
}
26 changes: 20 additions & 6 deletions less/variables.less
Expand Up @@ -306,7 +306,8 @@

// Accent colors
// -------------------------
@blue: #345;
@blue: #345;
@gold: darken(gold, 5%);

// Navbar
// -------------------------
Expand All @@ -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.