Originally I thought this was an issue with css-inline, but it's actually an issue on our end. BeautifulSoup is escaping the carets (> becomes >), preventing child selectors from getting applied. We can either use html.unescape in mjStyle, or perhaps we can decode from BeautifulSoup using formatter=None. It might be better to limit this to mjStyle only and use html.unescape so as not to affect the rest of the HTML. I'm still investigating the best approach.
Actual:
Expected:
Originally I thought this was an issue with css-inline, but it's actually an issue on our end. BeautifulSoup is escaping the carets (
>
becomes>
), preventing child selectors from getting applied. We can either usehtml.unescape
in mjStyle, or perhaps we can decode from BeautifulSoup usingformatter=None
. It might be better to limit this to mjStyle only and usehtml.unescape
so as not to affect the rest of the HTML. I'm still investigating the best approach.