Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added form, list, and table styling; moved form styling from layout.c…

…ss to new form.css
  • Loading branch information...
commit dc360cf50c59c4d02f63e156de9aba02a3e82741 1 parent c56ea1e
@jamesarosen authored
View
3  app/views/layouts/default.html.erb
@@ -12,6 +12,9 @@
<%= stylesheet_link_tag 'layout', :media => 'all' %>
<%= stylesheet_link_tag 'navbar', :media => 'screen' %>
<%= stylesheet_link_tag 'sidebar', :media => 'screen' %>
+ <%= stylesheet_link_tag 'form', :media => 'screen' %>
+ <%= stylesheet_link_tag 'list', :media => 'screen' %>
+ <%= stylesheet_link_tag 'table', :media => 'screen' %>
<%= stylesheet_link_tag 'color', :media => 'screen' %>
<%= stylesheet_link_tag 'browser', :media => 'screen' %>
<%= stylesheet_link_tag('debug', :media => 'all') if development? && false %>
View
147 public/stylesheets/form.css
@@ -0,0 +1,147 @@
+form {
+ display: block;
+}
+
+form.section {
+ padding-left: 10%;
+}
+
+form.inline, form.inline input {
+ display: inline;
+}
+
+
+div.fieldWithErrors, div.formError {
+ border: 0;
+ display: inline;
+ margin: 0;
+ padding: 0;
+}
+
+div.formError {
+ color: red;
+}
+
+div.fieldWithErrors input, div.fieldWithErrors textarea, div.fieldWithErrors select {
+ color: black;
+}
+form fieldset {
+ margin: 1em;
+ padding: 1em;
+}
+
+form fieldset legend {
+ font-size: 1.8em;
+}
+
+form fieldset legend + div {
+ margin-top: 1em;
+}
+
+form fieldset + fieldset {
+ padding-top: 1em;
+}
+
+form div {
+ clear: both;
+}
+
+
+
+form div + div {
+ padding-top: 1em;
+}
+
+form fieldset div div.fieldWithErrors {
+ clear: none;
+ display: inline;
+}
+
+form input {
+ font-size: 1em;
+}
+
+form input.hidden, form input[type="hidden"] {
+ border: 0;
+ display: none;
+ margin: 0;
+ padding: 0;
+}
+
+form input.text, form input[type="text"],
+form input.password, form input[type="password"],
+form textarea {
+ letter-spacing: 1px;
+}
+
+
+
+/* horizontal forms */
+
+form.horizontal div.formError {
+ display: block;
+ margin-left: 14.3em;
+}
+
+form.horizontal div.formError {
+ color: red;
+}
+
+form.horizontal div label, form.horizontal div input, form.horizontal div textarea, form.horizontal div p {
+ display: block;
+}
+
+form.horizontal div label {
+ padding: .5em;
+ float: left;
+ font-size: .95em;
+ text-align: right;
+ width: 13.8em;
+}
+
+form.horizontal div input, form.horizontal div textarea, form.horizontal div p {
+ margin-left: 14.3em;
+}
+
+form div input, form.horizontal div textarea {
+ border: 2px solid;
+ padding: .5em;
+ text-align: left;
+ width: 15em;
+}
+
+form.horizontal input.hidden, form.horizontal input[type="hidden"] {
+ border: 0;
+ display: none;
+ margin: 0;
+ padding: 0;
+}
+
+form.horizontal div input.button, form.horizontal div input[type="button"],
+form.horizontal div input.submit, form.horizontal div input[type="submit"] {
+ padding: .2em .6em;
+ text-align: center;
+ width: auto;
+}
+
+form.horizontal div input.checkbox, form.horizontal div input[type="checkbox"],
+form.horizontal div input.radio, form.horizontal div input[type="radio"] {
+ width: 1.1em;
+ height: 1.1em;
+}
+
+form.horizontal div.checkboxes {
+ padding-left: 11.5em;
+}
+
+form.horizontal div.checkboxes input.checkbox, form.horizontal div.checkboxes input[type="checkbox"],
+form.horizontal div.radios input.radio, form.horizontal div.radios input[type="radio"],
+form.horizontal div.checkboxes label, form.horizontal div.radios label {
+ display: inline;
+ float: none;
+ margin: 0;
+}
+
+form.horizontal p {
+ width: 20em;
+}
View
15 public/stylesheets/layout.css
@@ -43,21 +43,6 @@ div#footer {
clear: both;
}
-div.fieldWithErrors, div.formError {
- border: 0;
- display: inline;
- margin: 0;
- padding: 0;
-}
-
-div.formError {
- color: red;
-}
-
-div.fieldWithErrors input, div.fieldWithErrors textarea, div.fieldWithErrors select {
- color: black;
-}
-
div.flash.error {
color: red;
}
View
39 public/stylesheets/list.css
@@ -0,0 +1,39 @@
+dl dt, dl dd {
+ display: block;
+ line-height: 1.5em;
+}
+
+dl dt {
+ font-weight: bold;
+ float: left;
+ text-align: right;
+ width: 11em;
+}
+
+dl dd {
+ padding-left: 11.5em;
+}
+
+dl dd + dt, dl dd + dt + dd {
+ padding-top: .8em;
+}
+
+li + li {
+ margin-top: 1em;
+}
+
+ol.full li, ul.full li {
+ border-top: 3px solid;
+ border-bottom: 3px solid;
+ margin: 0;
+ padding: 1em;
+ width: 95%;
+}
+
+ol.full li + li, ul.full li + li {
+ border-top: 0;
+}
+
+ul.errors {
+ margin-left: 1em;
+}
View
31 public/stylesheets/table.css
@@ -0,0 +1,31 @@
+table {
+ border-spacing: 0 .2em;
+}
+
+table.section {
+ width: 95%;
+}
+
+table th, table td {
+ padding: 1em;
+}
+
+table th {
+ font-weight: bold;
+}
+
+table tbody tr + tr td, table tbody tr + tr th {
+ border-top: 3px solid black;
+}
+
+table tr th, table tr td {
+ text-align: left;
+}
+
+table tr th + th, table tr td + td {
+ text-align: center;
+}
+
+table td {
+ padding: .1em;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.