-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
114 lines (89 loc) · 1.63 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
title: math-style
slug: Web/CSS/math-style
page-type: css-property
browser-compat: css.properties.math-style
---
{{CSSRef}}
The `math-style` property indicates whether MathML equations should render with normal or compact height.
## Syntax
```css
/* Keyword values */
math-style: normal;
math-style: compact;
/* Global values */
math-style: inherit;
math-style: initial;
math-style: revert;
math-style: revert-layer;
math-style: unset;
```
### Values
- `normal`
- : The initial value, indicates normal rendering.
- `compact`
- : The math layout on descendants tries to minimize the logical height.
## Formal definition
{{cssinfo}}
## Formal syntax
{{CSSSyntax}}
## Examples
### Changing the style of a formula to compact
#### CSS
```css
math {
math-style: normal;
}
.compact {
math-style: compact;
}
```
#### HTML
```html
<p>
Normal height
<math>
<mrow>
<munderover>
<mo>∑</mo>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>+</mo>
<mn>∞</mn>
</mrow>
</munderover>
</mrow>
</math>
and compact height
<math class="compact">
<mrow>
<munderover>
<mo>∑</mo>
<mrow>
<mi>n</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow>
<mo>+</mo>
<mn>∞</mn>
</mrow>
</munderover>
</mrow>
</math>
equations.
</p>
```
#### Result
{{EmbedLiveSample("Examples")}}
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- {{cssxref("math-depth")}}
- {{cssxref("font-size")}}