Skip to content

Instantly share code, notes, and snippets.

@baldwindavid
Created July 2, 2010 21:36
Show Gist options
  • Save baldwindavid/461942 to your computer and use it in GitHub Desktop.
Save baldwindavid/461942 to your computer and use it in GitHub Desktop.
/* Forms */
form ol {
list-style: none;
margin: 0 0 1em 0;
}
form ol ol { margin-left: 0; }
form ol li { margin: 0 0 1em 0; }
form ol ol li { margin: 0 0 .25em 0; }
form ol li.error input { background: #FBE3E4; }
p.inline-errors { color: #D12F19; }
form ol li.file {
background: #e1e1e1;
border: 1px solid #c8c8c8;
padding: 10px;
}
form abbr { border-bottom: 0; }
label { display: block; }
.required label { font-weight: bold; }
.checkbox_field label, .radio_field label { font-weight: normal; }
a.cancel { color: #7d0d0d; }
.inline-hints {
font-size: .8em;
color: #666;
margin-bottom: .25em;
}
/* Fieldsets */
fieldset {
margin: 0 0 1.5em 0;
background: #f1f1f1;
padding: 1.5em 1.5em 1em 1.5em;
border: 1px solid #e3e3e3;
}
fieldset fieldset, fieldset fieldset fieldset {
padding: 0;
border: 0;
}
legend { font-weight: bold; }
.date legend.label, .datetime legend.label, .time legend.label, .check_boxes legend.label, .radio legend.label {
border:0;
padding:0;
background:none;
font-size: 1em;
}
fieldset.buttons {
background: inherit;
border: 0;
padding: 0;
}
fieldset.buttons li { display: inline; }
.radio fieldset {
padding: 0;
margin: 0;
}
/* Text fields */
input[type="text"], input[type="password"] {
width: 300px;
padding: 3px 2px;
font-size: inherit;
}
input[disabled='disabled'] {
background-color: #fcfcfc;
cursor:default;
}
input[type="checkbox"] {
margin: 0 3px 0 0;
vertical-align: middle;
position: relative;
top: -2px;
}
input[type="radio"] {
margin: 0 3px 0 0;
vertical-align: middle;
position: relative;
top: -2px;
}
.check_boxes label {
vertical-align: middle;
padding: 0;
display: inline;
}
.radio label { padding: 0; }
/* Textareas */
textarea {
width: 440px;
height: 200px;
margin: 0 0.5em 0.5em 0;
padding: 5px;
font-size: inherit;
}
/* Select fields */
fieldset .select select {
width:200px;
font-size: .9em;
}
optgroup { margin: 0 0 .5em 0; }
/* Date & Time */
form ol li.date ol li, form ol li.time ol li {
display: inline-block;
}
form ol li.datetime ol li {
display: inline-block;
}
form ol li.datetime select, form ol li.date select, form ol li.time select {
display: inline;
width: auto;
}
/* FORM OVERRIDES */
textarea.short {
height: 50px; }
textarea.tall {
height: 500px; }
.string input[type="text"].tiny {
width: 20px; }
.string input[type="text"].short {
width: 80px; }
.string input[type="text"].medium {
width: 200px; }
.numeric input[type="text"] {
width: 60px; }
.numeric input[type="text"].short {
width: 30px; }
.numeric input[type="text"].long {
width: 150px; }
form ol li {
margin-bottom: 1em; }
form ol li fieldset {
margin: 0; }
form ol li.radio ol {
margin: 0; }
form ol li.radio ol li {
display: inline-block;
padding-right: 8px; }
form ol li.radio legend, form ol li.date legend, form ol li.check_boxes legend {
background-color: #f1f1f1;
padding: 0; }
form ol li.radio legend span.label, form ol li.date legend span.label, form ol li.check_boxes legend span.label {
font-weight: normal;
color: #222222; }
form ol li.mixed ol {
margin: 0; }
form ol li.mixed ol li {
display: inline-block;
padding-right: 8px; }
form ol li.mixed ol li.radio {
vertical-align: bottom; }
form ol li.mixed ol li.radio legend {
display: none; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment