Skip to content

Commit

Permalink
- update some vars
Browse files Browse the repository at this point in the history
- update normalise
  • Loading branch information
mrmartineau committed Jul 6, 2013
1 parent a370b13 commit 30b13a9
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 173 deletions.
62 changes: 29 additions & 33 deletions scss/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ legend {
margin-bottom: $base-line-height + px;
@include font-size($base-font-size * 1.5);
@include line-height($base-line-height * 2);
color: $labelColour;
color: $label-colour;
border: 0;
border-bottom: 1px solid #eee;
white-space: normal;

// Small
& small {
Expand All @@ -66,6 +67,8 @@ textarea {
@include font-size($base-font-size);
@include line-height($base-line-height);
font-weight: normal;
vertical-align: baseline;
*vertical-align: middle;
}

// And only set font-family here for those that need it (note the missing label element)
Expand All @@ -80,12 +83,12 @@ textarea {
label {
display: block;
margin-bottom: 5px;
color: $labelColour;
color: $label-colour;
font-weight: bold;

& small {
font-weight: normal;
color: lighten($labelColour, 30%);
color: lighten($label-colour, 30%);
}

&.checkbox,
Expand All @@ -108,25 +111,24 @@ textarea,
select,
.uneditable-input,
.file-wrapper {

width: 210px;
height: $base-line-height * 1.5 + px;
padding: 4px;
margin-bottom: 9px;
@include font-size($base-font-size);
@include line-height($base-line-height);
color: $inputColour;
color: $input-colour;
background-color: #FFF;
border: 1px solid $inputBorder;
border: 1px solid $input-border;
@include border-radius(3px);
}

.uneditable-textarea {
width: auto;
height: auto;
}



// Mini reset for unique input types
input {
&[type="image"],
Expand All @@ -136,12 +138,13 @@ input {
height: auto;
padding: 0;
margin: 3px 0;
*margin-top: 0; /* IE7 */
line-height: normal;
cursor: pointer;
@include border-radius(0);
border: 0 \9; /* IE9 and down */
@include box-sizing(border-box);
border: 0 \9; // IE9 and down
}

&[type="image"] {
border: 0;
}
Expand All @@ -152,19 +155,11 @@ input {
padding: initial;
line-height: initial;
border: initial;
background-color: $inputBackground;
background-color: $input-background;
background-color: initial;
@include box-shadow(none);
}

// Help out input buttons
&[type="button"],
&[type="reset"],
&[type="submit"] {
width: auto;
height: auto;
}

// Remove shadow from image inputs
&[type="image"] {
@include box-shadow(none);
Expand All @@ -187,6 +182,17 @@ input {

}

// Help out input buttons
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
width: auto;
height: auto;
cursor: pointer;
-webkit-appearance: button;
}


// Set the height of select and file controls to match text inputs
select {
Expand All @@ -196,7 +202,7 @@ select {
@include line-height(28);

// Chrome on Linux and Mobile Safari need background-color
background-color: $inputBackground;
background-color: $input-background;

// Make multiple select elements height not fixed
&[multiple],
Expand Down Expand Up @@ -306,12 +312,7 @@ select {
input,
select,
textarea,
.uneditable-input,
// Redeclare since the fluid row class is more specific
.row-fluid input,
.row-fluid select,
.row-fluid textarea,
.row-fluid .uneditable-input {
.uneditable-input {
&[class*="span"] {
float: none;
margin-left: 0;
Expand All @@ -322,9 +323,6 @@ textarea,
width: 90%;
}

// GRID SIZING FOR INPUTS
//#grid > .input ($gridColumnWidth, $gridGutterWidth);

// DISABLED STATE
// --------------
// Disabled and read-only inputs
Expand Down Expand Up @@ -501,8 +499,6 @@ textarea {
.search-query {
padding-left: 14px;
padding-right: 14px;
padding-left: 4px \9; // IE7-8 doesn't have border-radius, so don't indent the padding
padding-right: 4px \9;
margin-bottom: 0; // remove the default margin on all inputs
@include border-radius(100px);
}
Expand All @@ -516,7 +512,7 @@ textarea {
padding: ($base-line-height - 1 + px) 20px ($base-line-height + px);
margin-top: $base-line-height + px;
margin-bottom: $base-line-height + px;
background-color: $formActionsBackground;
background-color: $form-actions-background;
border-top: 1px solid #ddd;
@include clearfix(); // Adding clearfix to allow for .pull-right button containers

Expand All @@ -531,14 +527,14 @@ textarea {

// For text that needs to appear as an input but should not be an input
.uneditable-input {
background-color: $inputBackground;
background-color: $input-background;
border-color: #eee;
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.025));
cursor: not-allowed;
}

// Placeholder text gets special styles; can't be bundled together though for some reason
@include placeholder($placeholderText);
@include placeholder($placeholder-text);

// HELP TEXT
// ---------
Expand Down
Loading

0 comments on commit 30b13a9

Please sign in to comment.