You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the specified value of `math-script-level` is 'auto' and the inherited
155
-
value of `math-style` is 'display' then the computed value of
156
-
`math-script-level` is the inherited value.
157
-
158
-
If the specified value of `math-script-level` is 'auto' and the inherited
159
-
value of `math-style` is 'inline' then the computed value of
160
-
`math-script-level` is the inherited value plus one.
161
-
162
-
If the specified value of `math-script-level` is of the form
163
-
'add(<integer>)' then
164
-
the computed value of `math-script-level` is the inherited value
165
-
plus the specified integer.
166
-
167
-
If the specified value of `math-script-level` is of the form '<integer>'
168
-
then the computed value of `math-script-level` is set to the specified integer.
169
-
170
-
If `font-size` is specified or if the specified value of `math-script-level`
171
-
is `initial` then `math-script-level` does not affect the computed value of
172
-
`font-size`.
173
-
Otherwise, the computed value of `font-size` is obtained by multiplying the
174
-
inherited value of `font-size` by a nonzero scale factor calculated by the
175
-
following procedure:
176
-
177
-
1. Let A be the inherited `math-script-level`, B the computed
178
-
`math-script-level`, C be 0.71 and S be 1.0
179
-
* If A = B then return S.
180
-
* If B < A, swap A and B and set `InvertScaleFactor` to true.
181
-
* Otherwise B > A and set `InvertScaleFactor` to false.
182
-
2. Let E be B - A > 0.
183
-
3. If the inherited font has an OpenType MATH table:
184
-
* Read `scriptPercentScaleDown` and fallback to C if the MathVariants table is absent or provides a null value.
185
-
* Read `scriptScriptPercentScaleDown` and fallback to C<sup>2</sup> if the MathVariants table is absent or provides a null value.
186
-
* If A ≤ 0 and B ≥ 2 then multiply S by `scriptScriptPercentScaleDown` and
187
-
decrement E by 2.
188
-
* Otherwise if A = 1 then multiply S by
189
-
`scriptScriptPercentScaleDown` / `scriptPercentScaleDown` and
190
-
decrement E by 1.
191
-
* Otherwise if B = 1 then multiply S by `scriptPercentScaleDown`
192
-
and decrement E by 1.
193
-
4. Multiply S by C<sup>E</sup>
194
-
5. Return S if `InvertScaleFactor` is false and 1/S otherwise.
114
+
See https://mathml-refresh.github.io/mathml-core/#the-math-style-property
195
115
196
116
### Native implementations of `display`, `displaystyle` and `scriptlevel`
197
117
198
-
The proposal allows to partially implement the `display`, `displaystyle` and
199
-
`scriptlevel` attributes as follows:
200
-
201
-
* Map `scriptlevel="+U"` to 'math-script-level: add(U)' (where U is an [unsigned integer](https://www.w3.org/Math/draft-spec/chapter2.html#type.unsigned-integer)).
202
-
* Map `scriptlevel="-U"` to 'math-script-level: add(-U)' (where U is an [unsigned integer](https://www.w3.org/Math/draft-spec/chapter2.html#type.unsigned-integer)).
203
-
* Map `scriptlevel="U"` to 'math-script-level: U' (where U is an [unsigned integer](https://www.w3.org/Math/draft-spec/chapter2.html#type.unsigned-integer)).
204
-
205
-
Then add rules equivalent to the following user agent stylesheet for MathML.
206
-
Note that some rendering engines do not allow universal selectors in their
207
-
user agent stylesheets and so such rules must be expanded to list all possible
0 commit comments