Subversion Repositories wimsdev

Rev

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

  1. /* Utilities.css
  2.  *
  3.  * Put an explanation for each line as it is used to generate help for css in createxo
  4.  * explanation format: "@css_class, explanation"
  5.  * check with css.pl when it is changed -> createxo help
  6.  */
  7.  
  8. /* @text-right, align to the right */
  9. .text-right{text-align: right;}
  10. /* @text-left, align to the left */
  11. .text-left {text-align: left;}
  12.  
  13. /* @center, center content */
  14. .center, .wimscenter{text-align: center;}
  15. /* @wimscenter, center with margins */
  16. div.wimscenter{ margin: .8em .5em .8em .5em; }
  17. /* */
  18. .wimscenter>.ggbapplet,.wimscenter>[id^="jmolApplet"],
  19. .wimscenter table{margin: 0 auto;}
  20. /* @blockcenter, center a block as a table */
  21. .blockcenter{
  22.   margin-right:auto;
  23.   margin-left: auto;
  24. }
  25.  
  26. /* */
  27. img.wimscenter { margin-left:auto;margin-right:auto;}
  28. /* @white, background in white */
  29. .white{background-color: white;}
  30. /* @float_right, text float on the right */
  31. .float_right{ float:right;}
  32. /* @float_left, text float on the left */
  33. .float_left{ float:left;}
  34. /* @clearall, use it to stop float for example with br/ */
  35. .clearall{ clear: both;}
  36.  
  37. /* @clearfix, use it to contain floats without altering what's next.*/
  38. .clearfix::after {
  39.   content: "";
  40.   clear: both;
  41.   display: table;
  42. }
  43.  
  44. /* @small, text is smaller */
  45. .small { font-size: 90%;}
  46. /* @smaller, text smaller than small */
  47. .smaller { font-size: 70%;}
  48. /* @bold, text in bold */
  49. .bold { font-weight:bold;}
  50. /* @larger, text larger */
  51. .larger { font-size: 120%;}
  52.  
  53. /* @wims_emph, emphasis some part of the text */
  54. .wims_emph {font-style:italic;font-weight:bold;}
  55.  
  56. /* @inline, text in line (if you put inline directly on li, there will be no margin)*/
  57. /*.inline{ }*/
  58. div.inline, li.inline {/*zoom:1;*/display:inline;display:inline-block;}
  59.  
  60. /* @inline, Inline general lists */
  61. .inline>li{margin-right:2em;}
  62.  
  63. /* @inline, Inline Ordered Lists*/
  64. ol.inline{overflow: auto;}
  65. /* */
  66. ol.inline>li {float:left;}
  67. /* */
  68. ol.inline::after {clear: both;}
  69.  
  70. /* @inline, Inline Unordered Lists */
  71. ul.inline>li{display:inline-block;}
  72.  
  73. /* @wims_nopuce, list without puce */
  74. .wims_nopuce {list-style-type:none}
  75. .wims_nopuce ul{list-style-type:disc}
  76. .wims_nopuce ul ul{list-style-type:circle}
  77. .wims_nopuce ul ul ul{list-style-type:square}
  78.  
  79. /* @spacer, use spacer on div to add extra spaces */
  80. .spacer{
  81.   content: " ";
  82.   display: block;
  83.   padding-top: .6em;
  84.   /* on Mozilla, only margin is taken on <br> (not padding) */
  85.   margin-top: .6em;
  86.   margin-bottom: .6em;
  87. }
  88. /* @spacer,use spacer on lists (ul/ol) to add extra spaces on all li */
  89. ul.spacer>li,ol.spacer>li{
  90.   margin-bottom: .6em;
  91. }
  92.  
  93. /* @unbreakable, use unbreakable on a div surrounding a large text element that must not be wrapped (like a long math formula). But be aware of small screens! */
  94. .unbreakable {
  95.   display:block;
  96.   overflow-x:auto;
  97.   white-space: nowrap;
  98. }
  99. /* @wims_scrollable, use for non responsive contents that cannot be shrinked on small screens */
  100. .wims_scrollable{
  101.   overflow-x: auto;
  102. }
  103.  
  104. /* @wims_video, default for HTML5 video player */
  105. .wims_video {
  106.   box-sizing: border-box;
  107.   max-width:100%;
  108.   margin:0;
  109.   background-color:#000;
  110.   box-shadow:2px 2px 2px gray;
  111.   white-space: nowrap;
  112. }
  113.  
  114. /* @wims_audio, default for audio */
  115. .wims_audio:not(.minimal_size) {
  116.   /** each browser has its own audio player look.*/
  117.   /* audio width can't be below 87px */
  118.   width:50%;
  119.   margin:10px 0;
  120.   padding:0 5px;
  121. }
  122. .wims_audio{
  123.   min-width:87px;
  124.   white-space: nowrap;
  125. }
  126. audio.minimal_size{
  127.   margin:2px;
  128.   /* With Chrome, audio height is always 54px and can't be changed */
  129.   /*height:1.2em;*/
  130.   vertical-align:middle;
  131. }
  132.  
  133. /* @feedback, style for feedback in oef exercise */
  134. .feedback {
  135.     background-color: #FFF;
  136.     border-color:#EEE;
  137.     border-color: rgba(0, 0, 0, .1);
  138.     border: 1px solid;
  139.     border-radius: 5px;
  140.     box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset;
  141.     margin-right: 15em;
  142.     padding: .5em;
  143. }
  144.  
  145. /* styles for emphasing results of the student */
  146. /* CSS vars (*-* are replaced by mkcss.pl) */
  147. :root {
  148.   --oef_indgood: *-*oef_indgood;
  149.   --oef_condgood: *-*oef_condgood;
  150.   --oef_indbad: *-*oef_indbad;
  151.   --oef_condbad: *-*oef_condbad;
  152.   --oef_indforget: *-*oef_indforget;
  153.   --oef_indpartial: *-*oef_indpartial;
  154.   --oef_indprec: *-*oef_indprec;
  155. }
  156.  
  157. /* @oef_indgood, emphasing results of the student: good answer */
  158. .oef_indgood { color: *-*oef_indgood; font-weight: bold;}
  159. /* @oef_condgood, emphasing results of the student: good condition */
  160. .oef_condgood{ color: *-*oef_condgood; font-weight: bold;}
  161. /* @oef_indbad, emphasing results of the student: bad answer */
  162. .oef_indbad { color: *-*oef_indbad; font-weight: bold;}
  163. /* @oef_condbad, emphasing results of the student: bad condition */
  164. .oef_condbad { color: *-*oef_condbad; font-weight: bold;}
  165. /* @oef_indforget, emphasing results of the student: forgotten item in the answer */
  166. .oef_indforget { color: *-*oef_indforget; font-weight: bold;}
  167. /* @oef_indpartial, emphasing results of the student: partial answer */
  168. .oef_indpartial{ color: *-*oef_indpartial; font-weight: bold;}
  169. /* @oef_indprec, emphasing results of the student: poor precision */
  170. .oef_indprec   { color: *-*oef_indprec; font-weight: bold;}
  171. /* @oef_indneutral, emphasing results of the student, with no tip of answer status */
  172. .oef_indneutral{color: initial; font-weight: bold;}
  173.  
  174. /* @jxgbox, style for including a jsxgraph figure */
  175. .wims_form .jxgbox {margin: .5rem auto .5rem auto}
  176. /* */
  177. .jsxgraph_button {text-align: center;}
  178. /* */
  179. .jxgboxchild {margin-left: auto; margin-right: auto;}
  180.  
  181. /* @wims_contribute, contributor citation or credits */
  182. /* @wims_credits, contributor citation or credits */
  183. .wims_contribute, .wims_credits  {
  184.   padding-top: 10px;
  185.   padding-right: 20px;
  186.   text-align: right;
  187.   color: #555;
  188.   font-weight: bold;
  189.   font-size: .8em;
  190. }
  191.  
  192. /* @wims_instruction, Technical instructions in exercises for example*/
  193. /* @wims_smallhelp, small help */
  194. /* @wims_difficultylevel, Difficulty level of the exercise or any other hint on the level */
  195. .wims_instruction, .wims_smallhelp, .wims_difficultylevel {
  196.   font-style: italic;
  197.   color: rgb(100,100,100);
  198.   background-color: rgba(230,230,230,.3);
  199.   border: 1px solid silver;
  200. }
  201.  
  202. .wims_instruction{
  203.   padding: 1rem;
  204.   margin: 0 auto 1rem auto;
  205. }
  206.  
  207. .wims_smallhelp {
  208.   font-size: small;
  209.   padding: 0 5px 1em;
  210.   margin: 1.5rem .5rem .2rem .5rem;
  211. }
  212.  
  213. .wims_instruction>h2,.wims_smallhelp>h2{
  214.   display: inline-block;
  215.   font-size: .8em;
  216.   padding: .4rem;
  217.   margin : -.3rem .5em .3em 0;
  218.   color: rgb(80,80,80);
  219.   background-color: silver;
  220. }
  221.  
  222. .wims_difficultylevel {
  223.   font-size:small;
  224.   padding: .1em 1px .1em;
  225. }
  226.  
  227. /* @wims_smallremark, remark in small */
  228. .wims_smallremark {font-size: small;}
  229.  
  230. /* @tt, tt*/
  231. .tt{
  232.   font-family: monospace, "Courier New";
  233.   border-left-width: 3px;
  234.   margin: 0;
  235.   padding: 0 3px;
  236. }
  237.  
  238. /* @unselectable, Prevent text selection */
  239. .unselectable{
  240.   user-select: none;
  241.   -webkit-user-select: none;
  242. }
  243. /* @wims_question, use wims_color1 */
  244. .wims_question {
  245.   border: 1px solid #CCC;
  246.   border-left-color: var(--wims_ref_bgcolor);
  247.   border-left-width: .2em;
  248.   margin: 2% 2%;
  249.   padding: 1em;
  250. }
  251.  
  252. /* for print version, to replace input radio or checkbox, it is a try ...*/
  253. ul.wims_list {
  254.   border: 1px solid var(--wims_ref_bgcolor);
  255.   padding-left:1em;
  256.   padding-right:2em
  257. }
  258. ul.wims_list li {
  259.   padding: 8px 16px;
  260.   border-bottom: 1px solid var(--wims_ref_bgcolor);
  261.   text-align:left;
  262. }
  263. .wims_checkbox li {list-style-type: square}
  264. .wims_radio li, .wims_menu li, .wims_click li {list-style-type: circle}
  265.