Thank you for your reply. The issue is the word problem should be the same size as the rest of the text, but it is not. Your test demonstrates valid CSS rendering behaviour, which is not what I see in Anki.
If I understood correctly, the behavior I demonstrated is as same as the Anki actual outcome. You think that “The issue is the word problem should be the same size as the rest of the text”, however this is inconsistent with what I’ve tested.
You demonstrated what Anki “should” produce, but you did not test in Anki and show the actual outcome. Please see my screenshots of the actual results in Anki.
I just did some "fiddling"on codepen and the following code outputs the expected results:
<style>
* {
font-size: 14pt;
}
strong {
font-size: 10pt;
}
</style>
<html>
<div style="font-size: 10pt; font-style: italic;">This is a div with a <strong>problem!</strong></div>
</html>
I think the issue is that I don’t know enough about CSS, if this is how it should be done. Feedback appreciated.
As I understand it, the * (universal) selector modifies the styling of every element, so it takes precedence over any inline style that doesn’t directly affect the specific element or tag itself. E.g., in your case, the inline style is applied to the parent <div> and not directly to the <b></b> tag.
Replacing * { font-size: 14pt; } with .card { font-size: 14pt; }, or adding div * { font-size: inherit; } to the Styling section seems to fix the issue.