app/assets/stylesheets/formagic/form.scss in formagic-0.2.6 vs app/assets/stylesheets/formagic/form.scss in formagic-0.2.8
- old
+ new
@@ -1,41 +1,87 @@
-// form ::: generic components
+// Form (generic components) ------------------------------ */
-.form {
+// General
+.form-input {
+ @include position(relative);
+ @include bottom-border($formagic-border-color);
- // General
+ padding : .5em 1em .9em;
+ display : block;
- .input-stacked {
- @include position(relative); padding: .5em 1em .9em;
- @include bottom-border($neutralColor); &:last-child { @include no-bottom-border; }
+ &:last-child { @include no-bottom-border; }
- textarea, input { width: 100%; @include no-outline; @include placeholder { color: $lightColor; } }
+ textarea, input {
+ @include no-outline;
+ @include placeholder { color: $formagic-placeholder-color; }
+ width : 100%;
+ }
- .label { display: block; line-height: 1.8; color: $stableColor; }
+ .label {
+ line-height : 1.8;
+ display : block;
+ color : $formagic-label-color;
}
+}
- // Validation error
+// Validation error
+.error-message {
+ margin-left : .5em;
+ font-size : .8em;
+ color : $formagic-assertive-color;
+}
- .error-message { color: $assertiveColor; font-size: .8em; margin-left: .5em; }
+// Required
+.input-required .label:before {
+ @include position(absolute, null null null .38em);
+ content : '*';
+ color : $formagic-assertive-color;
+}
- // Required
+// Disabled
+.input-disabled {
+ textarea, input {
+ color : lighten($formagic-base-color, 50%);
+ }
+}
- .input-required .label:before { content: '*'; color: $assertiveColor; @include position(absolute, null null null .38em); }
+// Character counter
+.input-character-counter {
+ margin-left : .5em;
+ font-size : .8em;
- // Disabled
+ &.exceeds {
+ color : $formagic-assertive-color;
+ }
+}
- .input-disabled { textarea, input { color: lighten($black, 20%); } }
+// Information box
+.form-information {
+ background : $formagic-border-color;
+ text-align : center;
+ margin : 1em 1em 0;
+ padding : 1em;
+}
- // Character counter
+// Input Actions used to the right from label
+.input-actions {
+ font-size : .8em;
+ float : right;
- .input-character-counter { font-size: .8em; margin-left: .5em; &.exceeds { color: $assertiveColor; } }
-
- // Information box
-
- .form-information {
- margin : 1em 1em 0;
- padding : 1em;
- background : $neutralColor;
- text-align : center;
+ a {
+ border-radius : 4px;
+ padding : .25em .75em;
+ margin : 0 0 0 .75em;
+ border : 1px solid $formagic-positive-color;
+ color : $formagic-positive-color;
}
+ a:hover {
+ background-color : $formagic-positive-color;
+ border-color : $formagic-positive-color;
+ color : white;
+ }
}
+
+
+
+