Permalink
Browse files

Merge from parent/make-sense branch

  • Loading branch information...
craig-davis committed Apr 24, 2013
2 parents 8c089f1 + af54e51 commit cc4d16654274ac70be41e41b8f4ba02e1c7c0cba
Showing with 324 additions and 233 deletions.
  1. +44 −92 css/style.uni-form.css
  2. +114 −74 css/uni-form.css
  3. +1 −1 demos/css/demo.css
  4. +165 −66 demos/fauxform.html
View
@@ -1,26 +1,28 @@
/* ==========================================================================
UNI-FORM DEFAULT STYLE by DRAGAN BABIC
UNI-FORM STYLE by DRAGAN BABIC
--------------------------------------------------------------------------
Copyright (c) 2013, Dragan Babic
--------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------
NOTE ABOUT STYLING FORMS
--------------------------------------------------------------------------
When styling your form make sure to copy the selector from uni-form.css
into this file and override it with your properties and values.
========================================================================== */
.uni-form {
@@ -104,72 +106,6 @@
-webkit-box-shadow: none;
box-shadow: none;
}
/* ==========================================================================
Widths
========================================================================== */
/* Default layout widths ---------------------------------------------------- */
/* Fields in default layout */
.uni-form .ctrl,
.uni-form .input-text,
.uni-form .input-file,
.uni-form .input-select,
.uni-form .input-textarea {
width: 65%;
}
/* Form hints in default layout */
.uni-form .form-hint {
width: 33%;
}
/* Grouped buttons in default layout */
.uni-form .ctrl-holder > ul {
width: 67%;
}
/* Alternate layout widths -------------------------------------------------- */
/* Labels in alternate layout */
.uni-form .inline-labels .ctrl-holder > label,
.uni-form .inline-labels .ctrl-holder > .label {
width: 33%;
padding-right: 3%;
}
/* Fields in alternate layout */
.uni-form .ctrl,
.uni-form .inline-labels .input-text,
.uni-form .inline-labels .input-file,
.uni-form .inline-labels .input-select,
.uni-form .inline-labels .input-textarea {
width: 67%;
}
/* Form hints in alternate layout */
.uni-form .inline-labels .form-hint {
margin-left: 33%;
}
/* Grouped fields in alternate layout */
.uni-form .inline-labels .ctrl-holder > ul {
width: 67%;
}
/* Nolabel option for alternate layout */
.uni-form .inline-labels .no-label ul {
margin-left: 33%;
}
/* ==========================================================================
Buttons
@@ -237,14 +173,11 @@
}
/* ==========================================================================
Smaller text
--------------------------------------------------------------------------
We are targeting the labels within grouped fields, and ctrls
Labels within grouped controls
========================================================================== */
.uni-form .ctrl,
.uni-form .ctrl-holder > ul label {
margin-top: .35em; /* Compensate for the smaller font size */
.uni-form .multi label {
margin-top: .3em; /* Compensate for the smaller font size */
font-size: .85em;
}
@@ -288,7 +221,7 @@
.uni-form #errorMsg li {
list-style: none;
margin: 0 0 4px 0;
padding: 7px 14px;
padding: 7px;
background: #f6bec1;
position: relative;
font-size: .85em;
@@ -366,3 +299,22 @@
.uni-form-row:last-child {
border-bottom-width: 1px;
}
/* ==========================================================================
480 breakpoint
========================================================================== */
@media screen and (max-width: 480px) {
.uni-form .ctrl-holder,
.uni-form .inline-labels .ctrl-holder {
padding-top: 1em;
padding-bottom: 1.5em;
}
.uni-form .ctrl-holder.valid,
.uni-form .inline-labels .ctrl-holder.valid {
background-position: 97% 1em;
}
}
Oops, something went wrong.

0 comments on commit cc4d166

Please sign in to comment.