Subversion Repositories wimsdev

Rev

Rev 17898 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <h2 class="wimscenter">CSS</h2>
  2.  
  3. !set a=!record 0 of wimshome/public_html/bases/sys/css_classes
  4. !set a=!nonempty lines $a
  5. !set acnt=!linecnt $a
  6.  
  7. <table class="wimsborder wimscenter">
  8. !for j = 1 to $acnt
  9.   !set aa=!line $j of $a
  10.   !if $(aa[1])!=$empty and $(aa[2])!=$empty
  11.     <tr><th>$(aa[1])</th><td>$(aa[2..-1])</td></tr>
  12.   !endif
  13. !next
  14. <tr><th><span class="wims_color1">wims_color1</span></th><td>theme style for menu</td></tr>
  15. <tr><th><span class="wims_color2">wims_color2</span></th><td>theme style for button</td></tr>
  16. <tr><th><span class="wims_color3">wims_color3</span></th><td>theme style for help button</td></tr>
  17. </table>
  18.  
  19. You may create your own style by including html tag directly in your exercise code.
  20.         You must use the WIMS command \css for it.
  21.  
  22. One can also use the var() CSS functions instead of any part of a value of another property
  23.   to insert their values. Here is the list:
  24. <pre>
  25.   --wims_bgcolor
  26.   --wims_link_color
  27.   --wims_vlink_color
  28.   --wims_hlink_color
  29.   --wims_ref_menucolor
  30.   --wims_ref_bgcolor
  31.   --wims_ref_button_color
  32.   --wims_ref_button_bgcolor
  33. </pre>
  34. For example, the following code prepares a frame
  35.         that consists of a border of specific width and use a specific wims color
  36.         (so it can change according to the WIMS server).
  37. <pre>
  38. &lt;style> .mystyle {
  39.   padding:1em;border-left:solid;
  40.   border-left-width:.2em;
  41.   border-left-color:var(--wims_ref_bgcolor);
  42.   }
  43. &lt;/style>
  44. </pre>
  45. <style>
  46. .mystyle {padding:1em;
  47.   border-left:solid;
  48.   border-left-width:.2em;
  49.   border-left-color:var(--wims_ref_bgcolor);
  50.   }
  51. </style>
  52.  
  53. The following example is useful in the exercise code for preparing
  54. two boxes side by side, for example an image and some text.
  55. The result will be responsive, so the display will adapt to the screen size.
  56. <pre>
  57. &lt;div class="wims_columns">
  58.   &lt;div class="medium_size img_col">image&lt;/div>
  59.   &lt;div class="medium_size text_col">text&lt;/div>
  60. &lt;/div>
  61. </pre>
  62.