Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

basic styles for actions

  • Loading branch information...
commit b56968f174700440c043587445eb7af26c910448 1 parent 82ee4a5
@justinfrench authored
Showing with 38 additions and 3 deletions.
  1. +16 −3 app/assets/stylesheets/formtastic.css
  2. +22 −0 sample/basic_inputs.html
View
19 app/assets/stylesheets/formtastic.css
@@ -18,6 +18,7 @@ This stylesheet forms part of the Formtastic Rails Plugin
.formtastic fieldset,
.formtastic legend,
.formtastic input,
+.formtastic button,
.formtastic textarea,
.formtastic select,
.formtastic p {
@@ -47,6 +48,7 @@ This stylesheet forms part of the Formtastic Rails Plugin
}
.formtastic input,
+.formtastic button,
.formtastic textarea {
font-family:sans-serif;
font-size:inherit;
@@ -80,18 +82,29 @@ This stylesheet forms part of the Formtastic Rails Plugin
}
-/* BUTTONS
+/* BUTTONS & ACTIONS
--------------------------------------------------------------------------------------------------*/
-.formtastic .buttons {
+.formtastic .buttons,
+.formtastic .actions {
overflow:hidden; /* clear containing floats */
padding-left:25%;
}
-.formtastic .button {
+.formtastic .button,
+.formtastic .action {
float:left;
padding-right:0.5em;
}
+.formtastic .button_action button {
+ padding:3px 8px;
+}
+
+.formtastic .link_action a {
+ display:block;
+ padding:3px 0;
+}
+
/* INPUTS
--------------------------------------------------------------------------------------------------*/
View
22 sample/basic_inputs.html
@@ -177,6 +177,28 @@
</li>
</ol>
</fieldset>
+
+ <fieldset class="actions">
+ <ol>
+ <li class="action input_action">
+ <input id="gem_submit" type="submit" value="Create Thing">
+ </li>
+ </ol>
+ </fieldset>
+
+ <fieldset class="actions">
+ <ol>
+ <li class="action button_action">
+ <button id="gem_submit" type="submit">Create Thing</button>
+ </li>
+ <li class="action button_action">
+ <button id="gem_submit" type="reset">Reset</button>
+ </li>
+ <li class="action link_action">
+ <a href="#">Cancel</button>
+ </li>
+ </ol>
+ </fieldset>
</form>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.