Subversion Repositories wimsdev

Rev

Rev 16842 | 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: "arobatcss_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-block;min-width: 1em}
  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.   max-width: 100%;
  103. }
  104.  
  105. /* @wims_video, default for HTML5 video player */
  106. .wims_video {
  107.   box-sizing: border-box;
  108.   max-width:100%;
  109.   margin:0;
  110.   background-color:#000;
  111.   box-shadow:2px 2px 2px gray;
  112.   white-space: nowrap;
  113. }
  114.  
  115. /* @wims_audio, default for audio */
  116. .wims_audio:not(.minimal_size) {
  117.   /** each browser has its own audio player look.*/
  118.   /* audio width can't be below 87px */
  119.   width:50%;
  120.   margin:10px 0;
  121.   padding:0 5px;
  122. }
  123. .wims_audio{
  124.   min-width:87px;
  125.   white-space: nowrap;
  126. }
  127. audio.minimal_size{
  128.   margin:2px;
  129.   /* With Chrome, audio height is always 54px and can't be changed */
  130.   /*height:1.2em;*/
  131.   vertical-align:middle;
  132. }
  133.  
  134. /* @feedback, style for feedback in oef exercise */
  135. .feedback {
  136.     background-color: #FFF;
  137.     border-color:#EEE;
  138.     border-color: rgba(0, 0, 0, .1);
  139.     border: 1px solid;
  140.     border-radius: 5px;
  141.     box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset;
  142.     margin-right: 15em;
  143.     padding: .5em;
  144. }
  145.  
  146. /* styles for emphasing results of the student */
  147. /* CSS vars (*-* are replaced by mkcss.pl) */
  148. :root {
  149.   --oef_indgood: *-*oef_indgood;
  150.   --oef_condgood: *-*oef_condgood;
  151.   --oef_indbad: *-*oef_indbad;
  152.   --oef_condbad: *-*oef_condbad;
  153.   --oef_indforget: *-*oef_indforget;
  154.   --oef_indpartial: *-*oef_indpartial;
  155.   --oef_indprec: *-*oef_indprec;
  156. }
  157.  
  158. /* @oef_indgood, emphasing results of the student: good answer */
  159. .oef_indgood { color: *-*oef_indgood; font-weight: bold;}
  160. /* @oef_condgood, emphasing results of the student: good condition */
  161. .oef_condgood{ color: *-*oef_condgood; font-weight: bold;}
  162. /* @oef_indbad, emphasing results of the student: bad answer */
  163. .oef_indbad { color: *-*oef_indbad; font-weight: bold;}
  164. /* @oef_condbad, emphasing results of the student: bad condition */
  165. .oef_condbad { color: *-*oef_condbad; font-weight: bold;}
  166. /* @oef_indforget, emphasing results of the student: forgotten item in the answer */
  167. .oef_indforget { color: *-*oef_indforget; font-weight: bold;}
  168. /* @oef_indpartial, emphasing results of the student: partial answer */
  169. .oef_indpartial{ color: *-*oef_indpartial; font-weight: bold;}
  170. /* @oef_indprec, emphasing results of the student: poor precision */
  171. .oef_indprec   { color: *-*oef_indprec; font-weight: bold;}
  172. /* @oef_indneutral, emphasing results of the student, with no tip of answer status */
  173. .oef_indneutral{color: initial; font-weight: bold;}
  174.  
  175. /* @jxgbox, style for including a jsxgraph figure */
  176. .wims_form .jxgbox {margin: .5rem auto .5rem auto}
  177. /* */
  178. .jsxgraph_button {text-align: center;}
  179. /* */
  180. .jxgboxchild {margin-left: auto; margin-right: auto;}
  181.  
  182. /* @wims_contribute, contributor citation or credits */
  183. /* @wims_credits, contributor citation or credits */
  184. .wims_contribute, .wims_credits  {
  185.   padding-top: 10px;
  186.   padding-right: 20px;
  187.   text-align: right;
  188.   color: #555;
  189.   font-weight: bold;
  190.   font-size: .8em;
  191. }
  192.  
  193. /* @wims_instruction, Technical instructions in exercises for example*/
  194. /* @wims_smallhelp, small help */
  195. /* @wims_difficultylevel, Difficulty level of the exercise or any other hint on the level */
  196. .wims_instruction, .wims_smallhelp, .wims_difficultylevel {
  197.   font-style: italic;
  198.   color: rgb(100,100,100);
  199.   background-color: rgba(230,230,230,.3);
  200.   border: 1px solid silver;
  201. }
  202.  
  203. .wims_instruction{
  204.   padding: 1rem;
  205.   margin: 0 auto 1rem auto;
  206. }
  207.  
  208. .wims_smallhelp {
  209.   font-size: small;
  210.   padding: 0 5px 1em;
  211.   margin: 1.5rem .5rem .2rem .5rem;
  212. }
  213.  
  214. .wims_instruction>h2,.wims_smallhelp>h2{
  215.   display: inline-block;
  216.   font-size: .8em;
  217.   padding: .4rem;
  218.   margin : -.3rem .5em .3em 0;
  219.   color: rgb(80,80,80);
  220.   background-color: silver;
  221. }
  222.  
  223. .wims_difficultylevel {
  224.   font-size:small;
  225.   padding: .1em 1px .1em;
  226. }
  227.  
  228. /* @wims_smallremark, remark in small */
  229. .wims_smallremark {font-size: small;}
  230.  
  231. /* @tt, tt*/
  232. .tt{
  233.   font-family: monospace, "Courier New";
  234.   border-left-width: 3px;
  235.   margin: 0;
  236.   padding: 0 3px;
  237. }
  238.  
  239. /* @unselectable, Prevent text selection */
  240. .unselectable{
  241.   user-select: none;
  242.   -webkit-user-select: none;
  243. }
  244. /* @wims_question, use wims_color1 */
  245. .wims_question {
  246.   border: 1px solid #CCC;
  247.   border-left-color: var(--wims_ref_bgcolor);
  248.   border-left-width: .2em;
  249.   margin: 2% 2%;
  250.   padding: 1em;
  251. }
  252.  
  253. /* for print version, to replace input radio or checkbox, it is a try ...*/
  254. ul.wims_list {
  255.   border: 1px solid var(--wims_ref_bgcolor);
  256.   padding-left:1em;
  257.   padding-right:2em
  258. }
  259. ul.wims_list li {
  260.   padding: 8px 16px;
  261.   border-bottom: 1px solid var(--wims_ref_bgcolor);
  262.   text-align:left;
  263. }
  264. .wims_checkbox li {list-style-type: square}
  265. .wims_radio li, .wims_menu li, .wims_click li {list-style-type: circle}
  266.