Subversion Repositories wimsdev

Rev

Rev 13695 | Rev 13975 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /** themes/_css - forms.css */
  2. /**  Somes styles designed to display fields in forms, tableless **/
  3. /* Currently used in exam and documents properties **/
  4.  
  5. /*form{
  6.     line-height: 2em;
  7. }*/
  8.  
  9. /* corrects attributes color:inherit from normalize.css */
  10. input, textarea {
  11.   color:black;
  12. }
  13. input[disabled], textarea[disabled] {
  14.   color:#444;
  15.   background-color:#DFDFDF;
  16. }
  17.  
  18.  
  19. /***** Foundation 6 input styles *****/
  20.  
  21. input:not([type]), [type="text"], [type="password"], [type="date"], [type="datetime"],
  22.  [type="datetime-local"], [type="month"], [type="week"], [type="email"], [type="number"],
  23.  [type="search"], [type="tel"], [type="time"], [type="color"], [type="url"], textarea {
  24.   border: 1px solid #cacaca;
  25.   box-sizing: border-box;
  26. }
  27.  
  28. /* everything but color */
  29. input:not([type]), [type="text"], [type="password"], [type="date"], [type="datetime"],
  30.  [type="datetime-local"], [type="month"], [type="week"], [type="email"], [type="number"],
  31.  [type="search"], [type="tel"], [type="time"], [type="url"], textarea {
  32.   padding: .5rem;
  33. }
  34.  
  35. input:not([type]):focus, [type='text']:focus, [type='password']:focus,
  36.  [type='date']:focus, [type='datetime']:focus, [type='datetime-local']:focus,
  37.  [type='month']:focus, [type='week']:focus, [type='email']:focus, [type='number']:focus,
  38.  [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='url']:focus,
  39.  [type='color']:focus, textarea:focus {
  40.   outline: none;
  41.   border: 1px solid #8a8a8a;
  42.   background-color: #fefefe;
  43.   box-shadow: 0 0 5px #cacaca;
  44.   transition: box-shadow .5s, border-color .25s ease-in-out;
  45. }
  46.  
  47.  
  48.  
  49. /* don't glue labels to their associated input */
  50. input[type="radio"]+label, input[type="checkbox"]+label{
  51.   padding-left: .3em;
  52. }
  53.  
  54. fieldset>ul{
  55.   margin: 0;
  56.   padding-left: 1.5em;
  57. }
  58. /* this is generaly a fieldset class */
  59. .property_fields{
  60.   /* Sadly, Safari don't handle flex on fieldsets yet (you have to add a div inside)...
  61.   display:flex;
  62.   flex-flow: row wrap;*/
  63.   position: relative;
  64.   margin-top:1em;
  65.   margin-bottom:1em;
  66.   max-width:900px;
  67.   padding:.5em 3px;
  68.   /*Background-image is here to lighten background color */
  69.   background-image: linear-gradient(to bottom,  rgba(255,255,255,0.7) 0%,rgba(255, 255, 255, 0.9) 48%,rgba(255,255,255,0.4) 100%); /* W3C */
  70. }
  71. /* If property_fields is flex, wimscenter must take the full width
  72. .property_fields .wimscenter{
  73.   width:100%;
  74. }*/
  75.  
  76. /*.property_fields .field {
  77.         margin: auto;
  78. }*/
  79.  
  80. .property_fields .actions,
  81. .property_fields .wimsform{
  82.   padding:.5em;
  83.   margin-top:.5em;
  84. }
  85. .property_fields>fieldset{
  86.   margin-bottom:.5em;
  87. }
  88.  
  89. .field.box{
  90.   padding: .4em .4em .8em .4em; /*.4em seems max for Chrome 2-columns layout */
  91.   border:1px solid #CFCFCF;
  92.   /*margin-bottom:1px;*/
  93.   line-height:1.2em;
  94.   /* min height lets having an help button right float*/
  95.   min-height:2em;
  96. }
  97. .property_fields p{
  98.   padding:0 1em;
  99. }
  100.  
  101. /*.box>div, .box>input, .box>textarea, .box>select{
  102.   margin-left:.3em;
  103. }*/
  104.  
  105. .property_fields .halfwidth{
  106.   /*display: inline-block;
  107.   vertical-align: middle;*/
  108.   float:left;
  109.   /*min-width: 380px;*/
  110.   /*min-height could be suppressed when all browsers will render well "flexbox"*/
  111.   min-height:4em;
  112. }
  113.  
  114. .property_fields .field:nth-child(even){
  115.   background-color: #DFDFDF;
  116.   background-color: rgba(230,230,230,.4);
  117. }
  118.  
  119. .property_fields .field:nth-child(odd){
  120.   background-color: #EFEFEF;
  121.   background-color: rgba(255,255,255,.8);
  122. }
  123.  
  124. .formHelp{
  125.   font-size: 9pt;
  126.   color:#666;
  127. }
  128.  
  129. .property_fields legend{
  130.   font-size: 1.2em;
  131.   font-weight: bold;
  132.   padding: 0 .5em;
  133.   margin-left:1em;
  134.   border:1px solid #BBB;
  135.   border-radius:5px;
  136. }
  137.  
  138. .field>label{
  139.   font-weight:bold;
  140.   font-size: .875rem;
  141.   line-height: 1.8;
  142.   display:inline-block;
  143.   vertical-align: middle;
  144. }
  145.  
  146. /*.property_fields .field>label{
  147.   min-width:10em;
  148. }*/
  149.  
  150. .property_fields select,.property_fields textarea{
  151.   vertical-align: middle;
  152. }
  153.  
  154. .field input[type="text"]:not(.inline),
  155. .field input[type="password"]:not(.inline),
  156. .field input[type="email"]:not(.inline),
  157. .field input[type="number"]:not(.inline),
  158. .field input[type="url"]:not(.inline),
  159. /*.field select,*/
  160. .field textarea{
  161.   width:100%;
  162. }
  163.  
  164.  
  165. .field input.small_input{
  166.   width:6em;
  167.   min-width:6em;
  168. }
  169.  
  170. input[type="color"]{
  171.   vertical-align: middle;
  172.   /* min size prevents Safari displaying a very small button */
  173.   min-width: 44px;
  174.   min-height: 23px;
  175. }
  176.  
  177. li.wims_formradio{
  178.   display: block;
  179. }
  180. .wims_formradio label {
  181.   min-width:0;
  182.   font-weight:normal;
  183. }
  184.  
  185. /** Styles for HTML 5 inputs (required or typed, like type="number")*/
  186. input:not([type="submit"]):not([type="button"]), textarea{
  187.   background-repeat: no-repeat;
  188.   /* 92% lets some browsers display control buttons like for the type="number" input */
  189.   background-position-x: 92%;
  190.   background-position-y: 3px;
  191. }
  192. input:required:not(.noicon), textarea:required:not(.noicon){
  193.   /* The padding is more precise than the 92%, but we apply it only for required inputs */
  194.   padding-right: 1em;
  195.   background-position-x: right;
  196. }
  197. /* invalid required inputs */
  198. input:invalid, textarea:invalid, .required_invalid_legend {
  199.   background-image: url("../../../gifs/svg/exclamation_mark_red.svg");
  200.   background-size: 1em;
  201.   box-shadow: 0 0 1px rgba(200, 0, 0, .85);
  202. }
  203. /* invalid inputs, with focus  */
  204. input:focus:invalid, textarea:focus:invalid, .required_invalid_focus_legend {
  205.   background-image: url("../../../gifs/svg/thumb_down_red.svg");
  206. }
  207. /* valid required inputs (dont show the green check on all valid, only required ones) */
  208. input:required:focus:valid, textarea:required:focus:valid, .required_valid_legend {
  209.   background-image: url("../../../gifs/svg/yes_check_green.svg");
  210.   background-size: .9em;
  211.   box-shadow: 0 0 1px rgba(0, 200, 0, .85);
  212. }
  213. /* noicon css class disable the required icon */
  214. input.noicon,
  215. input.noicon:required,
  216. input.noicon:required:focus,
  217. textarea.noicon:required,
  218. textarea.noicon:required:focus{
  219.   background-image:none;
  220. }
  221.  
  222.  
  223. /* Small screens */
  224. @media only screen and (max-width: 40em) {
  225.   .property_fields .halfwidth, .halfwidth{
  226.     width:100%;
  227.     display:block;
  228.     min-width: 0;
  229.   }
  230.   /* prevent inputs from being larger than screen*/
  231.   /*.box input:not([type="button"]):not([type="color"]),.box select,.box textarea{
  232.     width:75%;
  233.   }*/
  234.   .property_fields pre{
  235.     max-width:33em;
  236.   }
  237. } /* max-width 640px, mobile-only styles, use when QAing mobile issues */
  238.  
  239. /* Medium screens */
  240. @media only screen and (min-width: 40.063em) and (max-width: 64em) {
  241.   .property_fields .halfwidth{
  242.     min-width: 310px;
  243.   }
  244.   .property_fields pre{
  245.     max-width:53em;
  246.   }
  247. } /* min-width 641px and max-width 1024px, use when QAing tablet-only issues */
  248.  
  249. /* Large screens */
  250. @media only screen and (min-width: 64.063em) {
  251.   .property_fields pre{
  252.     max-width:850px;
  253.   }
  254. } /* min-width 1025px, large screens */
  255.  
  256.