Default.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* https://w3c.github.io/mathml-core/#user-agent-stylesheet */
  2. @namespace url(http://www.w3.org/1998/Math/MathML);
  3. /* Universal rules */
  4. * {
  5. font-size: math;
  6. display: block math;
  7. writing-mode: horizontal-tb !important;
  8. }
  9. /* The <math> element */
  10. math {
  11. direction: ltr;
  12. text-indent: 0;
  13. letter-spacing: normal;
  14. line-height: normal;
  15. word-spacing: normal;
  16. font-family: math;
  17. font-size: inherit;
  18. font-style: normal;
  19. font-weight: normal;
  20. display: inline math;
  21. math-shift: normal;
  22. math-style: compact;
  23. math-depth: 0;
  24. }
  25. math[display="block" i] {
  26. display: block math;
  27. math-style: normal;
  28. }
  29. math[display="inline" i] {
  30. display: inline math;
  31. math-style: compact;
  32. }
  33. /* <mrow>-like elements */
  34. semantics > :not(:first-child) {
  35. display: none;
  36. }
  37. maction > :not(:first-child) {
  38. display: none;
  39. }
  40. merror {
  41. border: 1px solid red;
  42. background-color: lightYellow;
  43. }
  44. mphantom {
  45. visibility: hidden;
  46. }
  47. /* Token elements */
  48. mi {
  49. text-transform: math-auto;
  50. }
  51. /* Tables */
  52. mtable {
  53. display: inline-table;
  54. math-style: compact;
  55. }
  56. mtr {
  57. display: table-row;
  58. }
  59. mtd {
  60. display: table-cell;
  61. /* Centering inside table cells should rely on box alignment properties.
  62. See https://github.com/w3c/mathml-core/issues/156 */
  63. text-align: center;
  64. padding: 0.5ex 0.4em;
  65. }
  66. /* Fractions */
  67. mfrac {
  68. padding-inline-start: 1px;
  69. padding-inline-end: 1px;
  70. }
  71. mfrac > * {
  72. math-depth: auto-add;
  73. math-style: compact;
  74. }
  75. mfrac > :nth-child(2) {
  76. math-shift: compact;
  77. }
  78. /* Other rules for scriptlevel, displaystyle and math-shift */
  79. mroot > :not(:first-child) {
  80. math-depth: add(2);
  81. math-style: compact;
  82. }
  83. mroot, msqrt {
  84. math-shift: compact;
  85. }
  86. msub > :not(:first-child),
  87. msup > :not(:first-child),
  88. msubsup > :not(:first-child),
  89. mmultiscripts > :not(:first-child),
  90. munder > :not(:first-child),
  91. mover > :not(:first-child),
  92. munderover > :not(:first-child) {
  93. math-depth: add(1);
  94. math-style: compact;
  95. }
  96. munder[accentunder="true" i] > :nth-child(2),
  97. mover[accent="true" i] > :nth-child(2),
  98. munderover[accentunder="true" i] > :nth-child(2),
  99. munderover[accent="true" i] > :nth-child(3) {
  100. font-size: inherit;
  101. }
  102. msub > :nth-child(2),
  103. msubsup > :nth-child(2),
  104. mmultiscripts > :nth-child(even),
  105. mmultiscripts > mprescripts ~ :nth-child(odd),
  106. mover[accent="true" i] > :first-child,
  107. munderover[accent="true" i] > :first-child {
  108. math-shift: compact;
  109. }
  110. mmultiscripts > mprescripts ~ :nth-child(even) {
  111. math-shift: inherit;
  112. }